docker-compose.yml
version: '3.8'
services:
mongodb:
image: mongo
container_name: syncm8_mongo
restart: unless-stopped
command: mongod --auth
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: main
MONGODB_DATA_DIR: /data/db
volumes:
- mongodbdata:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
networks:
- backend
ports:
- 27017:27017
mysql:
image: mysql:8.0.23
platform: linux/x86_64
container_name: syncm8_mysql
volumes:
- mysql_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: main
MYSQL_USER: user
MYSQL_PASSWORD: password
networks:
- backend
ports:
- 3306:3306
dev:
image: public.ecr.aws/a5f0m6q3/syncm8_dev:${DEVBOX_VERSION}
container_name: syncm8_dev
ports:
- "5000:5000"
depends_on:
- mongodb
- mysql
volumes:
- type: bind
source: ./
target: /home/worker/app
networks:
- backend
env_file:
- ./dev.env
stdin_open: true
tty: true
networks:
backend:
driver: bridge
volumes:
mongodbdata:
driver: local
mysql_data:
driver: local