Created
January 11, 2021 13:48
-
-
Save abserari/9f29e45d03279d0d0f9f6440e566cf32 to your computer and use it in GitHub Desktop.
这里是我收集的 docker-compose 写法
This file contains 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
version: '3' | |
services: | |
server: | |
image: golang:1.12 | |
restart: unless-stopped | |
depends_on: | |
- mysql | |
- postgres | |
volumes: | |
- .:/app | |
- $GOPATH/pkg/mod:/go/pkg/mod | |
working_dir: /app | |
command: go run . | |
mysql: | |
image: mysql:8.0 | |
restart: unless-stopped | |
ports: | |
- 3306:3306 | |
environment: | |
MYSQL_DATABASE: watermill | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
postgres: | |
image: postgres:11 | |
restart: unless-stopped | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_USER: watermill | |
POSTGRES_DB: watermill | |
POSTGRES_PASSWORD: "password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment