-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
208 lines (194 loc) · 6.42 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
version: "3"
volumes:
ckan_storage:
giftless_storage:
pg_data:
smtp4dev-data:
services:
ckan:
container_name: ckan
image: ghcr.io/fjelltopp/adx_develop/ckan_base:${CKAN_IMAGE_TAG}
deploy:
resources:
limits:
memory: 6G
links:
- db
- solr
- redis
ports:
- "0.0.0.0:5000:5000"
environment:
# Defaults work with linked containers, change to use own Postgres, SolR, Redis or Datapusher
- CKAN_SITE_URL=${CKAN_SITE_URL}
- CKAN_SMTP_USER=${CKAN_SMTP_USER}
- CKAN_SMTP_PASSWORD=${CKAN_SMTP_PASSWORD}
- CKAN_SQLALCHEMY_URL=postgresql://ckan:ckan@db/ckan
- CKAN_SOLR_URL=http://solr:8983/solr/ckan
- CKAN_REDIS_URL=redis://redis:6379/1
- CKAN_DATAPUSHER_URL=http://datapusher:8800/
- CKAN_SMTP_SERVER=smtp:25
- CKAN_SMTP_STARTTLS=False
- CKAN_SMTP_MAIL_FROM=support@fjelltopp_org
- CKAN_ERROR_EMAIL_FROM=support@fjelltopp_org
- CKAN_GOOGLE_ANALYTICS_ID=${CKAN_GOOGLE_ANALYTICS_ID}
- PYTHONDONTWRITEBYTECODE=1
volumes:
- ckan_storage:/var/lib/ckan
- ./:/usr/lib/adx
- ./:/usr/lib/ckan
- ./ckan/test-core.ini:/etc/ckan/test-core.ini
- ./ckan/adx_config.ini:/etc/ckan/ckan.ini
- ./ckan/adx_who.ini:/etc/ckan/who.ini
- ./ckan/utils/:/adx_utils
- ./ckan/ckan-entrypoint-adx.sh:/ckan-entrypoint.sh
- ./ckan/bootstrap.sh:/bootstrap.sh
- ./ckan/jwt_public_key.pem:/etc/ckan/jwt_public_key.pem
command: ["ckan","--config","/etc/ckan/ckan.ini", "run", "--host", "0.0.0.0", "--threaded"]
stdin_open: true
tty: true
supervisor:
container_name: supervisor
image: ghcr.io/fjelltopp/adx_develop/ckan_base:${CKAN_IMAGE_TAG}
depends_on:
- ckan
environment:
- CKAN_SITE_URL=${CKAN_SITE_URL}
- CKAN_SQLALCHEMY_URL=postgresql://ckan:ckan@db/ckan
- CKAN_SOLR_URL=http://solr:8983/solr/ckan
- CKAN_REDIS_URL=redis://redis:6379/1
- CKAN_DATAPUSHER_URL=http://datapusher:8800/
- PYTHONDONTWRITEBYTECODE=1
volumes:
- ckan_storage:/var/lib/ckan
- ./:/usr/lib/adx
- ./:/usr/lib/ckan
- ./ckan/adx_config.ini:/etc/ckan/ckan.ini
- ./ckan/adx_who.ini:/etc/ckan/who.ini
- ./ckan/ckan_supervisor.conf:/etc/supervisor/conf.d/ckan_supervisor.conf
- ./ckan/ckan-entrypoint-adx.sh:/ckan-entrypoint.sh
- ./ckan/bootstrap.sh:/bootstrap.sh
entrypoint: ["/wait-for-it.sh", "ckan:5000", "--timeout=0", "--", "/ckan-entrypoint.sh"]
command: ["/usr/bin/supervisord"]
stdin_open: true
tty: true
cron:
container_name: cron
image: adr.cron:${IMAGE_TAG}
build: cron
environment:
# Set the ADX_SYSADMIN_API_KEY env var on the host to auto send emails
- SECRET_ENVS={"ADX_SYSADMIN_API_KEY":"${ADX_SYSADMIN_API_KEY}"}
- CKAN_SITE_URL
volumes:
- /etc/localtime:/etc/localtime:ro
- ./submodules/ckan:/usr/lib/ckan/venv/src/ckan
datapusher:
container_name: datapusher
image: adr.datapusher:${IMAGE_TAG}
build:
context: ./submodules/datapusher
environment:
- DATAPUSHER_MAX_CONTENT_LENGTH
volumes:
- ./submodules/datapusher:/var/www/datapusher
ports:
- "8800:8800"
stdin_open: true
tty: true
command: /usr/local/bin/uwsgi --ini-paste deployment/datapusher-uwsgi.ini --honour-stdin
db:
container_name: db
ports:
- "5432:5432"
image: adr.db:${IMAGE_TAG}
build:
context: ./db
dockerfile: Dockerfile
args:
- DS_RO_PASS=datastore
- POSTGRES_PASSWORD=ckan
environment:
- DS_RO_PASS=datastore
- POSTGRES_PASSWORD=ckan
volumes:
- pg_data:/var/lib/postgresql/data
solr:
container_name: solr
ports:
- "8983:8983"
image: adr.solr:${IMAGE_TAG}
build:
context: ./solr
dockerfile: Dockerfile
environment:
- SOLR_LOG_LEVEL=WARN
redis:
container_name: redis
ports:
- "6379:6379"
image: redis:latest
giftless:
container_name: giftless
ports:
- "6001:6001"
image: adr.giftless:${IMAGE_TAG}
build:
context: ./submodules/giftless/
dockerfile: Dockerfile
environment:
- GIFTLESS_CONFIG_FILE=/giftless.yaml
- GIFTLESS_DEBUG=1
- AWS_ACCESS_KEY_ID=${GIFTLESS_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${GIFTLESS_AWS_SECRET_ACCESS_KEY}
volumes:
- ./giftless/giftless.yaml:/giftless.yaml
- ./ckan/jwt_public_key.pem:/jwt_public_key.pem
- giftless_storage:/lfs-storage
- ./submodules/giftless:/app
command: ["--http", "0.0.0.0:6001", "-M", "-T", "--threads", "2", "-p", "2", "--manage-script-name", "--callable", "app", "--honour-stdin"]
stdin_open: true
tty: true
nginx:
container_name: nginx
image: nginx
ports:
- "80:80"
volumes:
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
depends_on:
- ckan
- giftless
hostname: ${ADR_HOSTNAME}
networks:
default:
aliases:
- ${ADR_HOSTNAME}
smtp:
container_name: smtp
image: rnwood/smtp4dev:v3
restart: always
ports:
# Change the number before : to the port the web interface should be accessible on
- "5555:80"
# Change the number before : to the port the SMTP server should be accessible on
- "5025:25"
# Change the number before : to the port the IMAP server should be accessible on
- "143:143"
volumes:
# This is where smtp4dev stores the database.
- smtp4dev-data:/smtp4dev
environment:
#Specifies the server hostname. Used in auto-generated TLS certificate if enabled.
- ServerOptions__HostName=smtp
#Specifies the number of messages to keep
- ServerOptions__NumberOfMessagesToKeep=100
#Specifies the number of sessions to keep
#- ServerOptions__NumberOfSessionsToKeep=100
#Specifies the TLS mode to use. None=Off. StartTls=On demand if client supports STARTTLS. ImplicitTls=TLS as soon as connection is established.
- ServerOptions__TlsMode=None
#Specifies the TLS certificate to use if TLS is enabled/requested. Specify "" to use an auto-generated self-signed certificate (then see console output on first startup)
- ServerOptions__TlsCertificate=""
#Sets the name of the SMTP server that will be used to relay messages or "" if messages should not be relayed
- RelayOptions__SmtpServer=""