Created
February 2, 2022 17:48
-
-
Save Syex/acc84e0797c8c5b7a3281f459da49c41 to your computer and use it in GitHub Desktop.
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.9" | |
secrets: | |
POSTGRES_PASSWORD: | |
external: true | |
services: | |
api_service: | |
image: yourServerImage:latest | |
deploy: | |
restart_policy: | |
condition: on-failure | |
secrets: | |
- POSTGRES_PASSWORD | |
environment: | |
- POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD | |
ports: | |
- 8080:8080 | |
depends_on: | |
- db | |
db: | |
image: "postgres:latest" | |
deploy: | |
restart_policy: | |
condition: on-failure | |
secrets: | |
- POSTGRES_PASSWORD | |
environment: | |
- POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD | |
- POSTGRES_DB=myDb | |
ports: | |
- 5432:5432 | |
volumes: | |
- db-data:/var/lib/postgresql/data/ | |
volumes: | |
db-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment