zer0bin/docker-compose.yml

58 lines
1006 B
YAML

version: "3"
services:
backend:
build:
context: "./backend"
restart: always
tty: true
ports:
- "8000:8000"
networks:
- app-network
depends_on:
- postgres
frontend:
build:
context: "./frontend"
restart: always
tty: true
volumes:
- frontend-volume:/var/www/frontend
postgres:
image: postgres:alpine
restart: always
tty: true
environment:
POSTGRES_USER: postgres
POSTGRES_DB: zer0bin
POSTGRES_PASSWORD: postgres
networks:
- app-network
volumes:
- postgres-volume:/var/lib/postgresql/data
nginx:
image: nginx:alpine
restart: always
tty: true
ports:
- "80:80"
- "443:443"
depends_on:
- backend
volumes:
- ./example.nginx:/etc/nginx/conf.d/default.conf
- frontend-volume:/var/www/frontend
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
postgres-volume:
frontend-volume: