-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose.yml
82 lines (82 loc) · 2.78 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: "2.4"
services:
reverse-proxy:
image: bitnami/nginx:1.25.5-debian-12-r7
user: ${REVERSE_PROXY_CONTAINER_USER}
group_add:
- ${REVERSE_PROXY_CONTAINER_GROUP}
ports:
# Purposely omit port 80 in order to run ACME clients standalone.
- "443:8443"
volumes:
- ${NGINX_CONF}:/opt/bitnami/nginx/conf/server_blocks/vhost.conf:ro
# The web service may run on a separate subdomain from the auth service
- ${WEB_CERT}:/opt/bitnami/nginx/conf/web-cert.pem:ro
- ${WEB_KEY}:/opt/bitnami/nginx/conf/web-key.pem:ro
# When using letsencrypt, symlinks may go up a directory, mount whole dir
- /etc/letsencrypt:/etc/letsencrypt:ro
# Expose the currently deployed version id
- ${DEPLOYED_VERSION_FILE}:/app/software-version:ro
depends_on:
web:
condition: service_healthy
database:
condition: service_healthy
logging:
driver: journald
restart: always
web:
image: ghcr.io/philanthropydatacommons/service:20241022-44447b3
user: ${WEB_CONTAINER_USER}
environment:
- HOST=0.0.0.0
- PORT=3000
- PGHOST=database
- PGUSER=${PG_USER}
- PGPASSWORD=${PG_PASS}
- PGDATABASE=${PG_DB}
- PGPORT=${PG_PORT}
- AUTH_SERVER_ISSUER=${AUTH_SERVER_ISSUER}
- OPENAPI_DOCS_AUTH_CLIENT_ID=${OPENAPI_DOCS_AUTH_CLIENT_ID}
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID}
- S3_ACCESS_SECRET=${S3_ACCESS_SECRET}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_PATH_STYLE=${S3_PATH_STYLE}
- S3_REGION=${S3_REGION}
- S3_BUCKET=${S3_BUCKET}
healthcheck:
test: ["CMD", "curl", "--fail", "http://web:3000"]
interval: 10s
depends_on:
database:
condition: service_healthy
logging:
driver: journald
restart: always
database:
image: bitnami/postgresql:14.12.0-debian-12-r11
user: ${DATABASE_CONTAINER_USER}
# For local development it can be useful to expose `ports: 5432:${PG_PORT}`.
volumes:
- ${PG_DATA}:/bitnami/postgresql
# In order for psql to use an arbitrary user above:
- /etc/passwd:/etc/passwd:ro
# In order for psql to save command history:
- ${PG_DATA}:/var/lib/postgresql
# In order to extend/override configuration while keeping a generated one:
- ${PG_DATA}/conf/conf.d:/bitnami/postgresql/conf/conf.d:ro
environment:
- POSTGRESQL_USERNAME=${PG_USER}
- POSTGRESQL_PASSWORD=${PG_PASS}
- POSTGRESQL_DATABASE=${PG_DB}
- POSTGRESQL_PORT_NUMBER=${PG_PORT}
- POSTGRESQL_POSTGRES_PASSWORD=${PG_POSTGRES_PASS}
healthcheck:
test: ["CMD", "pg_isready", "-q",
"-d", "${PG_DB}",
"-U", "${PG_USER}",
"-p", "${PG_PORT}"]
interval: 7s
logging:
driver: journald
restart: always