-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (120 loc) · 4.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
130 lines (120 loc) · 4.13 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
version: "3.3"
services:
redis:
container_name: redis
image: redis:latest
deploy:
replicas: 1
tango:
container_name: tango
ports:
- '3000:3000'
build:
context: ./Tango
depends_on:
- redis
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./Tango/config.py:/opt/TangoService/Tango/config.py
- ./Tango/volumes:/opt/TangoService/Tango/volumes
environment:
- DOCKER_DEPLOYMENT
- RESTFUL_KEY
- DOCKER_REDIS_HOSTNAME
# Path to volumes within the Tango container. Does not need to be modified.
- DOCKER_VOLUME_PATH
# Modify the below to be the path to volumes on your host machine
- DOCKER_TANGO_HOST_VOLUME_PATH
autolab:
container_name: autolab
depends_on:
- mysql
- certbot
ports:
- '80:80'
- '443:443'
build: ./Autolab
# Some volume mappings may seem redundant, but we want to make it explicit
volumes:
- ./Autolab/db:/home/app/webapp/db
- ./Autolab/config/database.yml:/home/app/webapp/config/database.yml
- ./Autolab/config/environments/production.rb:/home/app/webapp/config/environments/production.rb
- ./Autolab/config/autogradeConfig.rb:/home/app/webapp/config/autogradeConfig.rb
- ./Autolab/config/oauth_config.yml:/home/app/webapp/config/oauth_config.yml
- ./Autolab/config/smtp_config.yml:/home/app/webapp/config/smtp_config.yml
- ./Autolab/config/github_config.yml:/home/app/webapp/config/github_config.yml
- ./Autolab/config/lti_config.yml:/home/app/webapp/config/lti_config.yml
- ./Autolab/config/lti_platform_jwk.json:/home/app/webapp/config/lti_platform_jwk.json
- ./Autolab/config/lti_tool_jwk.json:/home/app/webapp/config/lti_tool_jwk.json
- ./Autolab/courses:/home/app/webapp/courses
- ./Autolab/courseConfig:/home/app/webapp/courseConfig
- ./Autolab/assessmentConfig:/home/app/webapp/assessmentConfig
- ./Autolab/storage:/home/app/webapp/storage
- ./ssl/certbot/conf:/etc/letsencrypt
- ./ssl/certbot/www:/var/www/certbot
# Uncomment the below if you are using your own certificate
# - ./ssl/fullchain.pem:/etc/letsencrypt/live/test.autolab.io/fullchain.pem
# - ./ssl/privkey.pem:/etc/letsencrypt/live/test.autolab.io/privkey.pem
# - ./ssl/ssl-dhparams.pem:/etc/letsencrypt/ssl-dhparams.pem
# Comment the below out to disable SSL (not recommended)
- ./nginx/app.conf:/etc/nginx/sites-enabled/webapp.conf
# The line below bridges the Docker Wall for filesystem permissions
- /etc/group:/etc/group:ro
# Uncomment the below to disable SSL (not recommended)
# - ./nginx/no-ssl-app.conf:/etc/nginx/sites-enabled/webapp.conf
environment:
- DOCKER_SSL
- RESTFUL_HOST
- RESTFUL_PORT
- RESTFUL_KEY
- GITHUB_CLIENT_ID
- GITHUB_CLIENT_SECRET
- SECRET_KEY_BASE
- LOCKBOX_MASTER_KEY
- DEVISE_SECRET_KEY
- UNIX_OPS_DELEGATE_URL=http://unixops:4000
- UNIX_OPS_SHARED_SECRET=${UNIX_OPS_SHARED_SECRET?err}
- AUTOLAB_HOST_COURSES_ROOT=/home/ubuntu/autolab-docker/Autolab/courses
mysql:
container_name: mysql
image: mysql/mysql-server:latest
environment:
- MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_USER
- MYSQL_PASSWORD
volumes:
- mysql-db:/var/lib/mysql
certbot:
container_name: certbot
image: certbot/certbot
volumes:
- ./ssl/certbot/conf:/etc/letsencrypt
- ./ssl/certbot/www:/var/www/certbot
unixops:
container_name: unixops
build: ./Autolab
command: bundle exec ruby script/unix_ops_daemon.rb -p 4000
environment:
- RAILS_ENV=production
- UNIX_OPS_SHARED_SECRET=${UNIX_OPS_SHARED_SECRET?err}
- HOST_COURSES_PATH=/home/autolab/autolab-docker/Autolab/courses
user: "0:0"
privileged: true
cap_add:
- CHOWN
- DAC_OVERRIDE
- FOWNER
- SETGID
- SETUID
- FSETID
- DAC_READ_SEARCH
volumes:
- ./Autolab:/home/app/webapp
- /etc:/etc:rw
- /home:/home:rw
- /var:/var:rw
volumes:
mysql-db: