Database
Usage
cat > docker-compose.yml <<-'EOF'
# https://hub.docker.com/_/mysql
# https://hub.docker.com/_/postgres
# https://hub.docker.com/_/redis
# Port: 3306 5432 6379
version: "3"
services:
mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=mysql
- MYSQL_PASSWORD=password
network_mode: host
restart: always
volumes:
- ./mysql/mysql/:/var/lib/mysql/
postgres:
image: postgres:14
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
network_mode: host
restart: always
volumes:
- ./postgres/postgres/:/var/lib/postgresql/data/
redis:
image: redis:7
network_mode: host
restart: always
volumes:
- ./redis/redis/:/data/
EOF