34 lines
745 B
YAML
34 lines
745 B
YAML
services:
|
|
|
|
backend:
|
|
build: ./backend
|
|
container_name: sloth-backend
|
|
restart: unless-stopped
|
|
env_file: ./backend/.env
|
|
volumes:
|
|
- ./sloth-data:/data
|
|
networks:
|
|
- sloth-net
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/ping', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
container_name: sloth-frontend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8088:80"
|
|
networks:
|
|
- sloth-net
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
networks:
|
|
sloth-net:
|
|
driver: bridge
|