-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (39 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
46 lines (39 loc) · 1.08 KB
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
version: '3.8'
services:
mysql_db:
image: "mysql:8.0.27" # we have the same version of mysql in the prod
container_name: mysql56-container
environment:
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: analytics
MYSQL_USER: nonroot
MYSQL_PASSWORD: nonroot
psql_db:
image: "postgres:9.5.15"
container_name: psql-container
environment:
POSTGRES_ROOT_USER: root
POSTGRES_ROOT_PASSWORD: root
POSTGRES_DB: main
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
main:
build:
context: main
environment:
POSTGRESQL_CS: 'postgresql+psycopg2://postgres:password@psql_db:5432/main'
depends_on:
- psql_db
command: ["python", "./main.py" ]
analytics:
build:
context: analytics
environment:
POSTGRESQL_CS: 'postgresql+psycopg2://postgres:password@psql_db:5432/main'
MYSQL_CS: 'mysql+pymysql://nonroot:nonroot@mysql_db/analytics?charset=utf8'
depends_on:
- mysql_db
- psql_db
- main
command: ["python", "./analytics.py" ]