Add initial docker-compose configuration for server and client services
This commit is contained in:
31
web/docker-compose.yml
Normal file
31
web/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
server:
|
||||
build: ./server
|
||||
ports:
|
||||
- "4200:3001"
|
||||
networks:
|
||||
- inventory-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
start_period: 5s
|
||||
retries: 3
|
||||
|
||||
client:
|
||||
build: ./client
|
||||
ports:
|
||||
- "4444:3000"
|
||||
networks:
|
||||
- inventory-network
|
||||
depends_on:
|
||||
server:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
inventory-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user