Add production compose + swarm stack configurations
This commit is contained in:
56
11-deploying-containers/docker-swarm.yml
Normal file
56
11-deploying-containers/docker-swarm.yml
Normal file
@ -0,0 +1,56 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
client-react:
|
||||
image: sidpalas/devops-directive-docker-course-client-react-nginx:5
|
||||
networks:
|
||||
- frontend
|
||||
ports:
|
||||
- 80:80
|
||||
api-node:
|
||||
image: sidpalas/devops-directive-docker-course-api-node:7
|
||||
environment:
|
||||
- DATABASE_URL_FILE=/run/secrets/database-url
|
||||
secrets:
|
||||
- database-url
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
ports:
|
||||
- 3000:3000
|
||||
api-golang:
|
||||
image: sidpalas/devops-directive-docker-course-api-golang:6
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
environment:
|
||||
- DATABASE_URL_FILE=/run/secrets/database-url
|
||||
secrets:
|
||||
- database-url
|
||||
ports:
|
||||
- 8080:8080
|
||||
db:
|
||||
image: postgres:15.1-alpine
|
||||
networks:
|
||||
- backend
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd
|
||||
secrets:
|
||||
- postgres-passwd
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
|
||||
secrets:
|
||||
database-url:
|
||||
external: true
|
||||
postgres-passwd:
|
||||
external: true
|
||||
Reference in New Issue
Block a user