57 lines
1.0 KiB
YAML
57 lines
1.0 KiB
YAML
services:
|
|
back:
|
|
build:
|
|
context: ./back
|
|
dockerfile: Dockerfile
|
|
container_name: back
|
|
restart: always
|
|
expose:
|
|
- "8000"
|
|
healthcheck:
|
|
test: curl -f http://localhost:8000/api/products || exit 1
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
privileged: true
|
|
volumes:
|
|
- ./.env:/app/.env
|
|
- ./back/docker.db.sqlite3:/app/db.sqlite3
|
|
networks:
|
|
- network
|
|
|
|
front:
|
|
build:
|
|
context: ./front
|
|
dockerfile: Dockerfile
|
|
container_name: front
|
|
restart: always
|
|
expose:
|
|
- "4173"
|
|
depends_on:
|
|
back:
|
|
condition: service_healthy
|
|
networks:
|
|
- network
|
|
|
|
nginx:
|
|
image: nginx:1.25
|
|
container_name: nginx
|
|
restart: always
|
|
ports:
|
|
- "8098:80"
|
|
depends_on:
|
|
back:
|
|
condition: service_healthy
|
|
links:
|
|
- back:back
|
|
- front:front
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
networks:
|
|
- network
|
|
|
|
networks:
|
|
network:
|
|
driver: bridge
|