-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-prod.yml
executable file
·143 lines (143 loc) · 4.41 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
version: "3.6"
volumes:
nginx_colrc:
# external: true
services:
pod:
image: alpine
command: [ "sh", "-c", "while true; do sleep 5; done" ]
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:
# get this path from your local docker-compose.override.yml file, else use this default
- /Users/otabekabduraimov/Desktop/Temp/data/odinson:/data/odinson
#- /Users/alicekwak/data/odinson:/data/odinson
ports:
- "9001:9000"
restart: always
environment:
HOME: /app
depends_on:
- pod
network_mode: service:pod
# 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:
- pod
- postgres
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
network_mode: service:pod
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}
#POSTGRES_PASSWORD: 11chastq
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
depends_on:
- pod
network_mode: service:pod
backend:
container_name: colrc-v2-backend
build:
context: ./auth
# specify .dev or .prod variant
dockerfile: Dockerfile.dev
labels:
edu.arizona.colrc.description: "API for COLRC v2"
depends_on:
- pod
- 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
network_mode: service:pod
nginx:
container_name: nginx
build:
context: ./
labels:
edu.arizona.colrc.description: "Nginx for COLRC v2"
dockerfile: ./nginx/Dockerfile.prod
depends_on:
- pod
- backend
restart: 'no'
ports:
- "80:80"
- "443:443"
volumes:
# FIXME: add files and colrc frontend
- ./misc/file_data:/var/www/colrc:rw
- ./certbot:/var/www/colrc/certs:rw
network_mode: service:pod
environment:
- URL_UPLOAD=localhost
- URL_ODINSON=localhost
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:
- pod
- nginx
restart: always
ports:
- "8081:8081"
volumes:
- ./misc/file_data:/var/www/colrc:rw
network_mode: service:pod