Created
January 5, 2023 05:55
-
-
Save suncle1993/2a4b3d6218e04718a27772b65bb38ace to your computer and use it in GitHub Desktop.
docker-compose for local env
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
db: | |
image: 'mysql:5.7' | |
container_name: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=123456 | |
ports: | |
- '3306:3306' | |
volumes: | |
- './mysql/data:/var/lib/mysql' | |
- './mysql/init.sql:/docker-entrypoint-initdb.d/init.sql' | |
- './mysql/conf:/etc/mysql/conf.d' | |
command: [ | |
'--character-set-server=utf8mb4', | |
'--collation-server=utf8mb4_general_ci' | |
] | |
restart: always | |
redis: | |
image: 'redis:latest' | |
container_name: redis | |
volumes: | |
- './redis/conf/redis.conf:/usr/local/etc/redis/redis.conf' | |
- './redis/data/:/data:rw' | |
ports: | |
- '6379:6379' | |
command: | |
- redis-server | |
- /usr/local/etc/redis/redis.conf | |
restart: always | |
es: | |
image: 'elasticsearch:7.17.2' | |
container_name: es | |
environment: | |
- discovery.type=single-node | |
- xpack.security.enabled=false | |
- LANG=en_US.UTF-8 | |
volumes: | |
- './es/data:/usr/share/elasticsearch/data' | |
- './es/plugins:/usr/share/elasticsearch/plugins' | |
ports: | |
- '9200:9200' | |
- '9300:9300' | |
restart: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment