-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
62 lines (58 loc) · 1.68 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
---
version: "3.9"
services:
couchdb:
container_name: couchdb
image: couchdb:3.3.2
environment:
COUCHDB_USER: ${COUCHDB_USER}
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD}
COUCHDB_SECRET: ${COUCHDB_SECRET}
restart: on-failure
ports:
- 127.0.0.1:5984:5984
# Test to see if the database is accessible.
# orderportal waits for this with 'condition: service_healthy'
healthcheck:
test: curl -f http://localhost:5984/_up
interval: 10s
timeout: 1s
retries: 3
volumes:
# settings file
- type: bind
source: ./docker/couchdb/local.ini
target: /opt/couchdb/etc/local.d/local.ini
orderportal:
container_name: orderportal
image: orderportal-local:latest
# TODO set up non root user to simulate prod enviroment (look dds_web for example)
user: "root:root"
build:
dockerfile: Docker/Dockerfile-prod
context: ./
working_dir: /code/orderportal
command: sh -c "python ./cli.py create-database --silent && python ./main.py"
environment:
- ORDERPORTAL_SETTINGS_FILEPATH=/code/orderportal/settings_template.yaml
depends_on:
couchdb:
condition: service_healthy
restart: on-failure
ports:
- 127.0.0.1:4000:4000
- 127.0.0.1:8880:8880
volumes:
# Main website files (so can edit locally)
- type: bind
source: ./orderportal
target: /code/orderportal
# settings file
- type: bind
source: ./settings_template.yaml
target: /code/orderportal/settings_template.yaml
mailcatcher:
container_name: dds_mailcatcher
image: sj26/mailcatcher:latest
ports:
- 127.0.0.1:1080:1080