Skip to content

Instantly share code, notes, and snippets.

@dlsolution
Created October 15, 2023 07:54
Show Gist options
  • Save dlsolution/cd8fce91c7b4caab20411ee4c6a28d72 to your computer and use it in GitHub Desktop.
Save dlsolution/cd8fce91c7b4caab20411ee4c6a28d72 to your computer and use it in GitHub Desktop.
Docker Persistent Stack
version: "3.9"
services:
mysql:
container_name: mysql
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: car_rental
ports:
- 3306:3306
networks:
- common
volumes:
- ./data/mysql:/var/lib:mysql
redis:
container_name: redis
image: redis:latest
restart: always
ports:
- '6379:6379'
networks:
- common
volumes:
- ./data/redis:/data
mongo:
container_name: mongo
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
ports:
- '27017:27017'
networks:
- common
volumes:
- ./data/mongo:/data/db
networks:
common:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment