This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
53 lines (51 loc) · 1.86 KB
/
docker-compose.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
db:
container_name: yh-community-contacts-api-db
image: postgres:14-alpine
environment:
POSTGRES_DB: community_contacts_api
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
volumes:
- yh-community-contacts-api-db-data:/var/lib/postgresql/data
app:
container_name: yh-community-contacts-api
build:
context: .
deploy:
resources:
limits:
cpus: "${DOCKER_APP_CPUS:-0}"
memory: "${DOCKER_APP_MEMORY:-0}"
env_file: .env
environment:
DB_CLIENT: "postgresql"
DB_CONNECTION_STRING: "postgresql://postgres:password@yh-community-contacts-api-db:5432/community_contacts_api"
LOG_ROTATION_DATE_FORMAT:
LOG_ROTATION_FILENAME:
NODE_ENV: production
HOST: 0.0.0.0
healthcheck:
test: curl "localhost:${PORT:-3000}/admin/healthcheck"
interval: 60s
timeout: 3s
start_period: 5s
retries: 3
labels:
# Using OCI Image Format spec
# See https://github.com/opencontainers/image-spec/blob/main/annotations.md
org.opencontainers.image.authors: Frazer Smith <[email protected]>
org.opencontainers.image.licenses: MIT
org.opencontainers.image.url: https://github.com/Fdawgs/yh-community-contacts-api
logging:
options:
max-file: "${LOG_ROTATION_MAX_LOGS:-10}"
max-size: "${LOG_ROTATION_MAX_SIZE:-100m}"
ports:
- "127.0.0.1:${PORT:-3000}:${PORT:-3000}"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
volumes:
yh-community-contacts-api-db-data:
external: false