This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: deployment/Dockerfile
|
||||
container_name: andris-app
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=file:./prisma/dev.db
|
||||
- DVLA_API_KEY=${DVLA_API_KEY:-}
|
||||
- MOTORCHECK_API_KEY=${MOTORCHECK_API_KEY:-}
|
||||
volumes:
|
||||
- app-db:/app/prisma
|
||||
- app-logs:/app/logs
|
||||
networks:
|
||||
- andris-net
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: andris-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- cert-data:/etc/letsencrypt
|
||||
- cert-www:/var/www/certbot
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- andris-net
|
||||
|
||||
networks:
|
||||
andris-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
app-db:
|
||||
driver: local
|
||||
app-logs:
|
||||
driver: local
|
||||
cert-data:
|
||||
driver: local
|
||||
cert-www:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user