-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (37 loc) · 930 Bytes
/
docker-compose.yml
File metadata and controls
38 lines (37 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
NODE_VERSION: ${NODE_VERSION}
ALPINE_VERSION: ${ALPINE_VERSION}
container_name: ${DOCKER_CONTAINER_NAME}
restart: unless-stopped
ports:
- "${PORT}:${PORT}"
- "${PM2_PORT}:${PM2_PORT}"
volumes:
- ${LOG_PATH}:/app/logs
environment:
- NODE_ENV=${NODE_ENV}
- PORT=${PORT}
- PM2_PORT=${PM2_PORT}
- NEXT_TELEMETRY_DISABLED=${NEXT_TELEMETRY_DISABLED}
healthcheck:
test: |
/bin/sh -c '
wget -qO- http://localhost:${PORT}/api/health || exit 1;
wget -qO- http://localhost:${PM2_PORT}/api/health || exit 1;
'
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: ${MEMORY_LIMIT}
reservations:
memory: ${MEMORY_RESERVATION}