fix: expose ports, add healthcheck and shared network for Coolify
This commit is contained in:
@@ -3,13 +3,35 @@ version: '3.8'
|
||||
services:
|
||||
backend:
|
||||
build: ./backend
|
||||
expose:
|
||||
- 3001
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- PORT=3001
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget --spider -q http://localhost:3001 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
- VITE_API_URL=/api
|
||||
expose:
|
||||
- 80
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user