-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
122 lines (111 loc) · 2.45 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
version: "3.9"
services:
prodction:
image: nginx
volumes:
- "./nginx/production.conf:/etc/nginx/conf.d/production.conf"
ports:
- "5000:5000"
depends_on:
- production_db
- production_svelte
- production_flask
networks:
- production
production_flask:
build: .
command: ["pipenv", "run", "python", "app.py"]
networks:
- production
environment:
DATABASE: "SQL"
DB_URL: "production_db:5432"
DB_USER: 'not_admin'
DB_PASS: 'Not_My_admin_password'
MODE: "production"
ENV: "production"
production_db:
image: postgres:13.3
environment:
POSTGRES_USER: 'not_admin'
POSTGRES_PASSWORD: 'Not_My_admin_password'
networks:
- production
production_svelte:
build: frontend/.
networks:
- production
development:
image: nginx
volumes:
- "./nginx/development.conf:/etc/nginx/conf.d/development.conf"
ports:
- "5001:5001"
depends_on:
- development_db
- development_svelte
- development_flask
networks:
- development
development_flask:
build: .
command: ["python", "app.py"]
networks:
- development
environment:
DATABASE: "SQL"
DB_URL: "development_db:5432"
DB_USER: 'dev'
DB_PASS: 'toor'
MODE: "development"
ENV: "development"
development_db:
image: postgres:13.3
volumes:
- "development_db_volume:/var/lib/postgresql/data"
environment:
POSTGRES_USER: 'dev'
POSTGRES_PASSWORD: 'toor'
networks:
- development
development_svelte:
build: frontend/.
networks:
- development
unit:
build:
context: .
dockerfile: unittest.dockerfile
command: ["python", "test_unit.py"]
environment:
MODE: "unit"
DATABASE: "MEMORY"
integration:
build: .
command: ["python", "integration_tests.py"]
depends_on:
- integration_db
networks:
- integration
environment:
MODE: "integration"
DATABASE: "SQL"
DB_URL: "integration_db:5432"
DB_USER: 'DONT_LEAVE_ME_ALONE'
DB_PASS: 'CHANGE_ME'
integration_db:
image: postgres:13.3
environment:
POSTGRES_USER: 'DONT_LEAVE_ME_ALONE'
POSTGRES_PASSWORD: 'CHANGE_ME'
networks:
- integration
networks:
integration:
driver: bridge
development:
driver: bridge
production:
driver: bridge
volumes:
development_db_volume: