-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
120 lines (112 loc) · 3.06 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
name: devu
services:
api:
# Runs the API
container_name: api
build:
context: .
dockerfile: api.Dockerfile
environment:
TANGO_KEY: devutangokey # TODO: load in from env file. for now this is defined in tango section below
WAIT_HOSTS: db:5432
ports:
- '3001:3001'
profiles:
- '' # so it starts with normal docker compose
- 'dev-client' # start when developing client
client:
# Builds the front end and exports static files to ./dist
build:
dockerfile: client.Dockerfile
context: .
volumes:
- ./dist:/out
profiles:
- '' # so it starts with normal docker compose
- 'dev-api' # start when developing api
nginx:
# Hosts the front end static files from ./dist/local thorough a web server
build:
context: .
dockerfile: nginx.Dockerfile
volumes:
- ./dist/local:/usr/share/nginx/html
ports:
- '9000:80'
profiles:
- '' # so it starts with normal docker compose
- 'dev-api' # start when developing api
# Database stuff
db:
# Runs the PostgreSQL database
image: postgres
environment:
POSTGRES_DB: typescript_api
POSTGRES_USER: typescript_user
POSTGRES_PASSWORD: password
ports:
- '5432:5432'
expose:
- '5432'
restart: unless-stopped
minio:
image: minio/minio
ports:
- '9002:9000'
- '9001:9001'
expose:
- '9000'
# volumes:
# - /tmp/data:/data
environment:
MINIO_ROOT_USER: typescript_user
MINIO_ROOT_PASSWORD: changeMe
command: server /data --console-address ":9001"
config:
# Generates a config file for the API
build:
context: devU-api/scripts
command: "./generateConfig.sh config/default.yml"
image: ubautograding/devtools
volumes:
- ./devU-api/config:/config
profiles:
- 'dev-api' # start when developing api, not needed in production
# tango stuff
tango:
container_name: tango
ports:
- '127.0.0.1:3000:3000'
build:
context: ./tango
environment:
- DOCKER_REDIS_HOSTNAME=redis
- RESTFUL_KEY=devutangokey
# - DOCKER_DEPLOYMENT
# 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=/absolute/path/to/tango_files
depends_on:
- redis
volumes:
- ./tango.config.py:/opt/TangoService/Tango/config.py
- /var/run/docker.sock:/var/run/docker.sock
- ./logs/tango/:/var/log/tango/
- ./logs/tangonginx:/var/log/nginx
- ./tango_files:/opt/TangoService/Tango/volumes
restart: unless-stopped
redis:
container_name: redis
image: redis:latest
ports:
- '127.0.0.1:6379:6379'
deploy:
replicas: 1
restart: unless-stopped
# certbot:
# container_name: certbot
# image: certbot/certbot
# volumes:
# - ./ssl/certbot/conf:/etc/letsencrypt
# - ./ssl/certbot/www:/var/www/certbot