-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.prod.yml
152 lines (144 loc) · 3.43 KB
/
docker-compose.prod.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
services:
setup:
profiles: ['setup']
build:
context: .
dockerfile: Dockerfile
image: opendsa/devstack:1.0
stdin_open: true
tty: true
volumes:
- .:/devstack
db:
profiles: ['production', 'staging', 'external']
image: mariadb:10.2
restart: always
command: --default-authentication-plugin=mysql_native_password
ports:
- "127.0.0.1:3307:3306"
volumes:
- db:/var/lib/mysql
- ./mysql/my.cnf:/etc/mysql/my.cnf
- ./mysql/encryption:/etc/mysql/encryption
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
opendsa:
profiles: ['production', 'staging', 'external']
build:
context: ./opendsa
dockerfile: Dockerfile.server
image: opendsa/opendsa:1.0
restart: always
volumes:
- ./opendsa:/opendsa
ports:
- "127.0.0.1:8080:8080"
expose:
- 8080
env_file:
- .env
deforms:
profiles: ['production', 'staging', 'external']
build:
context: ./opendsa
dockerfile: Dockerfile.deforms
image: opendsa/deforms:1.0
restart: always
volumes:
- ./opendsa:/opendsa
ports:
- "127.0.0.1:8081:8080"
expose:
- 8081
env_file:
- .env
opendsa-lti:
profiles: ['production', 'staging', 'external']
build:
context: ./opendsa-lti
dockerfile: Dockerfile
args:
- RAILS_ENV=${RAILS_ENV}
- ODSA_BRANCH=${ODSA_BRANCH}
- LTI_BRANCH=${LTI_BRANCH}
image: opendsa/opendsa-lti:1.0
restart: always
volumes:
- ./opendsa-lti:/opendsa-lti
- ./opendsa:/opendsa
- staticvolume:/opendsa-lti/public/assets
- bundle:/usr/local/bundle
- cache:/cache # added to support windows
entrypoint: /opendsa-lti/docker-entrypoint.sh
command: ["./scripts/start-prod.sh"]
expose:
- 8443
depends_on:
- db
env_file:
- .env
environment:
- SPROCKETS_CACHE=/cache # added to support windows
openpop:
build:
context: ./openpop
dockerfile: Dockerfile
image: opendsa/openpop:1.0
command: ["./runservers.sh"]
volumes:
- ./openpop:/openpop
expose:
- 9295
nginx:
profiles: ['production', 'staging']
build:
context: ./nginx
dockerfile: Dockerfile
image: opendsa/nginx:1.0
restart: always
command: [nginx, '-g', 'daemon off;']
ports:
- 80:80
- 443:443
tty: true
volumes:
- ./certs:/etc/certs
- staticvolume:/collected-static
- ./opendsa:/collected-static/OpenDSA:ro
depends_on:
- opendsa-lti
swag:
profiles: ['external']
image: lscr.io/linuxserver/swag:latest
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- URL=yourdomain.url
- VALIDATION=http
# - SUBDOMAINS=www, #optional
# - CERTPROVIDER= #optional
# - DNSPLUGIN=cloudflare #optional
# - PROPAGATION= #optional
# - DUCKDNSTOKEN= #optional
# - EMAIL= #optional
# - ONLY_SUBDOMAINS=false #optional
# - EXTRA_DOMAINS= #optional
# - STAGING=false #optional
volumes:
- /nginx/nginxconf:/config
ports:
- 80:80
- 443:443
restart: unless-stopped
volumes:
db:
staticvolume:
bundle:
cache: # added to support windows