Refactor docker-compose to include API key in environment variables for server and client

This commit is contained in:
MayaTheShy
2026-03-22 02:15:08 -04:00
parent 2a68ffcb90
commit 0d3de9dc48

View File

@@ -5,6 +5,8 @@ services:
- inventory-network
volumes:
- server-data:/data
environment:
- API_KEY=${API_KEY:-}
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health',r=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))"]
@@ -14,7 +16,10 @@ services:
retries: 3
client:
build: ./client
build:
context: ./client
args:
VITE_API_KEY: ${API_KEY:-}
ports:
- "80:80"
networks: