-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
executable file
·167 lines (167 loc) · 4.76 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
version: "3.6"
volumes:
nginx_colrc:
# external: true
services:
odinson-rest-api:
image: docker.io/lumai/odinson-rest-api:experimental
stdin_open: true # docker run -i
tty: true # docker run -t
env_file:
- ./.env
user: 'root'
container_name: odinson-rest-api
volumes:
- /Users/blarg/data/odinson:/data/odinson
ports:
- "9001:9000"
restart: always
environment:
HOME: /app
networks:
vpcbr:
ipv4_address: 10.5.0.8
hasura:
image: docker.io/hasura/graphql-engine:v1.3.3
container_name: colrc-v2-hasura
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
restart: always
env_file:
- ./.env
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${DB_PASSWORD}@postgres:5432/${DB_NAME}?application_name=${DB_NAME}
#HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:11chastq@postgres:5432/postgres
HASURA_GRAPHQL_DEV_MODE: "true" # disable in prod
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_JWT_SECRET: '{"type": "RS256", "key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApNQ+GQ9sfCdPJh/J9Vo5\nqMBIm/EMiznaXbirJnr7Eispo6TPwdJJxBH1zqHgWuFi1Dik1fFLNyCUDxRoggEt\ntwGiHJIRVp/dN0sQRhHgCUO6P76gRncwFcP7VmcxqeDjVNS0h2P/4lf17ZF2Gl4k\nAGTsA8uQoSWnpFS+QS0Rzc8HcFrORTiToQny9G2h1ji9xU5d28onE/0kXPMNm27x\noznXgKkg6rS1Qz9RgKueU9riBWhsFZQoCImF2tT59buyIHCyRiMF0v3XKcLLg4Hn\ntPLnHE5dPcxwQapa1qvQ38xqgd4EVVolP15N6fEOGQarHMGPP939Ajxh51vr12yT\nswIDAQAB\n-----END PUBLIC KEY-----\n"}'
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
networks:
vpcbr:
ipv4_address: 10.5.0.2
postgres:
image: docker.io/library/postgres:12
container_name: colrc-v2-postgres-db
# see https://hub.docker.com/_/postgres/
ports:
- "5432:5432"
restart: always
env_file:
- ./.env
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./misc/db_data:/var/lib/postgresql/data
# SQL scripts in this directory will be executed in alphabetical order
- ./misc/sql:/docker-entrypoint-initdb.d
healthcheck:
# https://www.postgresql.org/docs/12/app-pg-isready.html
test: ["CMD", "pg_isready", "--dbname=$DB_NAME", "--username=$DB_USERNAME"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 10
networks:
vpcbr:
ipv4_address: 10.5.0.3
backend:
container_name: colrc-v2-backend
build:
context: ./auth
dockerfile: Dockerfile.dev
labels:
edu.arizona.colrc.description: "API for COLRC v2"
depends_on:
- postgres
- hasura
restart: always
ports:
- "4000:4000"
env_file:
- ./.env
environment:
# For dev, this should just use the service name
DB_HOST: postgres
# used by Sequelize
DB_DIALECT: postgres
volumes:
- ./auth:/app:rw
# don't bind mount node_modules
#- /app/node_modules
networks:
vpcbr:
ipv4_address: 10.5.0.4
frontend:
container_name: colrc-v2-frontend
build:
context: ./frontend
dockerfile: Dockerfile.dev
labels:
edu.arizona.colrc.description: "Frontend for COLRC v2"
depends_on:
- backend
restart: always
ports:
- "3000:3000"
env_file:
- ./frontend/.env.development
volumes:
# FIXME: build the code and then deploy it to the volume
- nginx_colrc:/app/build:rw
- ./frontend:/app:rw
networks:
vpcbr:
ipv4_address: 10.5.0.5
nginx:
container_name: nginx
build:
context: ./nginx
dockerfile: Dockerfile.dev
labels:
edu.arizona.colrc.description: "Nginx for COLRC v2"
depends_on:
- frontend
restart: 'no'
ports:
- "80:80"
- "443:443"
environment:
- URL_UPLOAD=localhost
- URL_ODINSON=localhost
volumes:
# FIXME: add files and colrc frontend
- ./misc/file_data:/var/www/colrc:rw
networks:
vpcbr:
ipv4_address: 10.5.0.6
file_upload:
container_name: file_upload
env_file:
- ./.env
build:
context: ./file_upload
dockerfile: Dockerfile.dev
labels:
edu.arizona.colrc.description: "File upload processor for COLRC v2"
depends_on:
- nginx
restart: always
ports:
- "8081:8081"
volumes:
- ./misc/file_data:/var/www/colrc:rw
networks:
vpcbr:
ipv4_address: 10.5.0.7
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1