-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
105 lines (75 loc) · 2.5 KB
/
Copy pathcompose.yml
File metadata and controls
105 lines (75 loc) · 2.5 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
services:
postgres:
image: cda-postgres
build:
context: containerfiles
dockerfile: database
environment:
POSTGRES_PASSWORD: ${DB_PASS_ADMIN}
SOURCE_DIR: /src
JWT_SECRET: ${REST_JWT_SECRET}
ACCOUNT_ZERO_NAME: ${ACCOUNT_ZERO_NAME}
ACCOUNT_ZERO_PASS: ${ACCOUNT_ZERO_PASS}
volumes:
- ${PWD}/database:/src:ro
# init, secret and timeline would already run in order because that’s how the alphabet works, but add numbers for clarity
- ${PWD}/database/init.sql:/docker-entrypoint-initdb.d/0-init.sql:ro
- ${PWD}/database/insert-jwt.sql:/docker-entrypoint-initdb.d/1-insert-jwt-secret.sql:ro
- ${PWD}/database/timeline.sql:/docker-entrypoint-initdb.d/2-timeline.sql:ro
- ${PWD}/database/create-account-0.sql:/docker-entrypoint-initdb.d/3-create-account-0.sql:ro
- postgres-data:/var/lib/postgresql/data:rw
- ${PWD}/database/postgresql.conf:/etc/postgresql/postgresql.conf:ro
command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
networks:
- postgres
postgREST:
image: docker.io/postgrest/postgrest:v14.1
environment:
PGRST_JWT_SECRET: ${REST_JWT_SECRET}
PGRST_DB_URI: "postgres://postgres:${DB_PASS_ADMIN}@postgres:5432/cda"
volumes:
- ${PWD}/database/postgrest.conf:/etc/postgrest/postgrest.conf:ro
command: ["postgrest", "/etc/postgrest/postgrest.conf"]
depends_on:
- postgres
networks:
- postgres
- rest
api:
image: nginx:stable-alpine3.21-perl
depends_on:
- postgREST
ports:
- "3000:443"
- "3443:3443"
volumes:
- ${PWD}/api-proxy-nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ${PWD}/tls/ca/gateway-ca.crt:/etc/nginx/tls/gateway-ca.crt:ro
- ${PWD}/tls/server/${SERVER_CN}.crt:/etc/nginx/tls/server.crt:ro
- ${PWD}/tls/server/${SERVER_CN}.key:/etc/nginx/tls/server.key:ro
networks:
- rest
web-builder:
image: cda-web-builder
build:
context: containerfiles
dockerfile: web-console-builder
volumes:
- ${PWD}/web-console:/src
- node-modules:/src/node_modules:rw
- react-build:/src/dist/:rw
restart: "no"
web-console:
image: nginx:stable-alpine3.21-perl
ports:
- "4430:443"
volumes:
- react-build:/usr/share/nginx/html:ro
- ${PWD}/web-console/nginx.conf:/etc/nginx/conf.d/default.conf:ro
volumes:
postgres-data:
node-modules:
react-build:
networks:
postgres: {}
rest: {}