-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
131 lines (124 loc) · 3.71 KB
/
docker-compose.yaml
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
version: "3.7"
services:
front-envoy:
container_name: envoy
image: front-envoy:v1.17.0
build:
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
- ./certs/cryptowise-ai.pem:/etc/ssl/certs/cryptowise-ai.pem
- ./certs/cryptowise-ai.key:/etc/ssl/certs/cryptowise-ai.key
- ./certs/cryptowise-cacert.pem:/etc/ssl/certs/cryptowise-cacert.pem
- ./certs/platform-web.ai.pem:/etc/ssl/certs/platform-web.ai.pem
- ./certs/platform-web.ai.key:/etc/ssl/certs/platform-web.ai.key
networks:
- envoymesh
# logging:
# driver: gcplogs
expose:
- "80"
- "443"
- "8081"
- "8082"
ports:
- "80:80"
- "443:443"
- "8081:8081"
- "8082:8082"
environment:
- "ENVOY_UID=0"
# command: "apt-get update -y && apt-get install net-tools"
frontend:
container_name: frontend
image: frontend:latest
build:
context: ./cryptowise_frontend
dockerfile: Dockerfile
volumes:
- ./frontend-envoy.yaml:/etc/frontend-envoy.yaml
networks:
envoymesh:
aliases:
- frontend
environment:
- SERVICE_NAME=frontend
# logging:
# driver: gcplogs
expose:
- "8082"
api:
container_name: api
image: api:latest
build:
context: ./platform_umbrella
dockerfile: Dockerfile
volumes:
- ./postgres-data:/var/run/postgresql
- ./api-envoy.yaml:/etc/api-envoy.yaml
networks:
envoymesh:
aliases:
- api
depends_on:
- postgres_db
links:
- postgres_db
# logging:
# driver: gcplogs
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGPASSWORD=postgres
- POSTGRES_DB=platform_prod
- DATABASE_URL=postgres_db
- SERVICE_NAME=api
expose:
- "8081"
command: "apt-get update -y && apt-get install -y -q net-tools postgresql-client"
postgres_db:
container_name: postgres_db
image: postgres:latest
build:
context: .
dockerfile: Dockerfile-postgres_db
restart: always
volumes:
- ./postgres-data:/var/run/postgresql
- ./db-envoy.yaml:/etc/db-envoy.yaml
- ./sql/create_tables/dump_11_15_2021.sql:/tmp/dump_11_15_2021.sql
# copy the sql script to create tables
- ./sql/create_tables:/docker-entrypoint-initdb.d
environment:
- POSTGRES_PASSWORD=postgres
- SERVICE_NAME=postgres_db
networks:
envoymesh:
aliases:
- postgres_db
command: postgres
# cloud-sql-proxy:
# container_name: cloudsql
# image: gcr.io/cloudsql-docker/gce-proxy:1.15
# # Port: MySQL (3306), PostgreSQL (5432)
# command: /cloud_sql_proxy -instances=eternal-sunset-206422:us-central1:umbrella-db=tcp:0.0.0.0:5432
# # volumes:
# # # this mounts your application default credential on the container, preventing the
# # # 'invalid json file "/config": google: read JWT from JSON credentials: 'type' field is "authorized_user" (expected "service_account")'
# # # error if you point to the actual credential file directly
# # - ~/.config:/root/.config
# ports:
# - 5432:5432
# cloudsql-proxy:
# container_name: cloudsql
# image: gcr.io/cloudsql-docker/gce-proxy:1.15
# command: /cloud_sql_proxy --dir=/tmp/cloudsql -instances=eternal-sunset-206422:us-central1:umbrella-db=tcp:0.0.0.0:5432 -credential_file=/home/certs
# ports:
# - "127.0.0.1:5432:5432"
# volumes:
# - ./certs/eternal-sunset-206422-27df1759075f.json:/home/certs
# - /tmp/cloudsql:/cloudsql
# restart: always
networks:
envoymesh: {}