-
Notifications
You must be signed in to change notification settings - Fork 77
/
docker-compose.yaml
116 lines (109 loc) · 3.01 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
# Copyright 2018 Google Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: "3"
volumes:
db_data:
services:
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: crmint_development
MYSQL_USER: crmint
MYSQL_PASSWORD: crmint
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: >
/usr/bin/mysql --user=root --password=root --execute "SHOW DATABASES;"
start_period: 5s
interval: 2s
timeout: 60s
retries: 30
pubsub:
build:
context: ./backend/pubsub
dockerfile: Dockerfile
jobs:
build:
context: ./backend
dockerfile: jobs.Dockerfile
ports:
- "8081:8081"
volumes:
- ./backend:/app
- ~/.config/gcloud:/root/.config/gcloud
environment:
GOOGLE_CLOUD_PROJECT: $GOOGLE_CLOUD_PROJECT
PUBSUB_EMULATOR_HOST: pubsub:8432
PUBSUB_PROJECT_ID: $GOOGLE_CLOUD_PROJECT
PUBSUB_VERIFICATION_TOKEN: CRMintPubSubVerificationToken
FLASK_ENV: development
FLASK_DEBUG: 1
PORT: 8081
command: >
flask run --host 0.0.0.0 --port 8081
depends_on:
pubsub:
condition: service_started
controller:
build:
context: ./backend
dockerfile: controller.Dockerfile
ports:
- "8080:8080"
volumes:
- ./backend:/app
- ~/.config/gcloud:/root/.config/gcloud
environment:
APP_TITLE: Local App
NOTIFICATION_SENDER_EMAIL: [email protected]
SERVICE_ACCOUNT_EMAIL: [email protected]
GOOGLE_CLOUD_PROJECT: $GOOGLE_CLOUD_PROJECT
PUBSUB_EMULATOR_HOST: pubsub:8432
PUBSUB_PROJECT_ID: $GOOGLE_CLOUD_PROJECT
PUBSUB_VERIFICATION_TOKEN: CRMintPubSubVerificationToken
DATABASE_URI: >
mysql+mysqlconnector://crmint:crmint@db:3306/crmint_development
FLASK_ENV: development
FLASK_DEBUG: 1
SQLALCHEMY_ECHO: 1
PORT: 8080
entrypoint: []
command:
/bin/bash -c "python setup_pubsub.py && flask run --host 0.0.0.0 --port 8080"
depends_on:
db:
condition: service_healthy
pubsub:
condition: service_started
jobs:
condition: service_started
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: ${FRONTEND_DOCKER_TARGET:-prod}
ports:
- "4200:4200"
volumes:
- ./frontend:/app
environment:
APP_TITLE: Local App
PORT: 4200
depends_on:
controller:
condition: service_started
jobs:
condition: service_started