-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
175 lines (163 loc) · 4.7 KB
/
docker-compose.yml
File metadata and controls
175 lines (163 loc) · 4.7 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: "3.8"
services:
files:
image: egapro_files
build:
context: ./packages/files
dockerfile: Dockerfile
volumes:
- ./packages/files:/app
- ./mnt:/mnt
environment:
ROOT_PATH: /mnt
TRUSTED_PROXY_IP: "172.17.0.1"
AUTH_PASSWD_FILE: "/app/.htpasswd"
WHITELIST_IP: "127.0.0.1"
FILES_PUBLIC: "dgt.xlsx,dgt-representation.xlsx,index-egalite-fh.xlsx,indexes.csv,full.ndjson,dgt-export-representation.xlsx"
FILES_RESTRICTED: ""
ports:
- 8080:8080
restart: always
redis-init:
image: node:18-alpine
depends_on:
- redis
volumes:
- ./scripts:/scripts
working_dir: /scripts
command: sh -c "npm install ioredis crypto && node populate-redis.js"
environment:
REDIS_HOST: redis
REDIS_PORT: 6379
restart: on-failure
redis:
image: redis:alpine
ports:
- "6379:6379"
restart: always
volumes:
- redis_data:/data
command: redis-server --appendonly yes
maildev:
image: djfarrelly/maildev
command: bin/maildev --hide-extensions STARTTLS
ports:
- "${MAILDEV_SMTP_PORT:-1025}:${MAILDEV_SMTP_PORT:-1025}"
- "${MAILDEV_WEB_PORT:-1080}:${MAILDEV_WEB_PORT:-1080}"
environment:
MAILDEV_WEB_PORT: ${MAILDEV_WEB_PORT:-1080}
MAILDEV_SMTP_PORT: ${MAILDEV_SMTP_PORT:-1025}
restart: always
api:
image: egapro_api
build:
context: ./packages/api
dockerfile: Dockerfile.dev
volumes:
- ./packages/api:/app
- api_egginfos:/app/egapro.egg-info
- ./mnt:/mnt
environment:
SCHEDULER: "True"
EGAPRO_SEND_EMAILS: "True"
EGAPRO_SMTP_HOST: maildev
EGAPRO_SMTP_PORT: ${MAILDEV_SMTP_PORT}
EGAPRO_SMTP_LOGIN: ""
EGAPRO_SMTP_PASSWORD: ""
EGAPRO_SMTP_SSL: ""
EGAPRO_TEST_DBHOST: test_db
EGAPRO_DBHOST: ${EGAPRO_DBHOST:-db}
EGAPRO_DBNAME: ${EGAPRO_DBNAME:-egapro}
EGAPRO_DBPORT: ${EGAPRO_DBPORT:-5432}
EGAPRO_DBUSER: ${EGAPRO_DBUSER:-postgres}
EGAPRO_DBPASS: ${EGAPRO_DBPASS:-postgres}
EGAPRO_STAFF: ${EGAPRO_STAFF:-""}
ports:
- 2626:2626
depends_on:
- db
- test_db
restart: always
db:
restart: always
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: egapro
ports:
- 5438:5432
volumes:
- pgdata:/var/lib/postgresql/data
test_db:
restart: always
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_egapro
ports:
- 5436:5432
volumes:
- ./packages/api/egapro/sql/init_test.sql:/docker-entrypoint-initdb.d/init_test.sql
pgadmin:
image: dcagatay/pwless-pgadmin4
ports:
- 5050:80
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_USER_2: postgres
POSTGRES_PASSWORD_2: postgres
POSTGRES_HOST_2: test_db
POSTGRES_PORT_2: 5432
volumes:
- pgadmin:/var/lib/pgadmin
keycloak:
image: quay.io/keycloak/keycloak:26.0
command: start-dev --import-realm
ports:
- 8180:8080
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
volumes:
- ./keycloak/realm-egapro.json:/opt/keycloak/data/import/realm-egapro.json
restart: always
# TODO handle redirect with nginx (https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview/#configuring-for-use-with-the-nginx-auth_request-directive)
oauth2-proxy-github:
image: bitnami/oauth2-proxy
command:
# - --redirect-url=https://oauth-egapro.preprod.ovh.fabrique.social.gouv.fr/callback
- --redirect-url=http://localhost:4180/oauth2/callback
- --upstream=file:///dev/null
- --whitelist-domain=.ovh.fabrique.social.gouv.fr
- --whitelist-domain=localhost:3000
ports:
- 4180:4180
environment:
OAUTH2_PROXY_COOKIE_SECRET: ""
OAUTH2_PROXY_CLIENT_ID: ""
OAUTH2_PROXY_CLIENT_SECRET: ""
OAUTH2_PROXY_SCOPE: "user:email read:org"
OAUTH2_PROXY_COOKIE_SECURE: "false"
OAUTH2_PROXY_PASS_USER_HEADERS: "true"
OAUTH2_PROXY_PASS_ACCESS_TOKEN: "true"
OAUTH2_PROXY_SKIP_PROVIDER_BUTTON: "true"
OAUTH2_PROXY_SHOW_DEBUG_ON_ERROR: "true"
OAUTH2_PROXY_ERRORS_TO_INFO_LOG: "true"
OAUTH2_PROXY_PROVIDER: github
OAUTH2_PROXY_GITHUB_ORG: SocialGouv
OAUTH2_PROXY_GITHUB_TEAM: egapro
OAUTH2_PROXY_HTTP_ADDRESS: 0.0.0.0:4180
OAUTH2_PROXY_EMAIL_DOMAINS: "*"
OAUTH2_PROXY_FOOTER: "-"
OAUTH2_PROXY_BANNER: "-"
OAUTH2_PROXY_REVERSE_PROXY: "true"
volumes:
pgdata:
pgadmin:
redis_data:
api_egginfos: