forked from bmegyesi/swegram-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (63 loc) · 1.54 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
version: '3.1'
services:
db:
image: mysql:latest
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
container_name: mysql-server
restart: always
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: swegram_corpus
MYSQL_USER: swegram
MYSQL_PASSWORD: swegram_pass
networks:
- swegram-network
profiles:
- client
- frontend
backend:
image: rex0046/swegram-backend:1.0.4 # Image needs to be built with network
depends_on:
- db
container_name: swegram-backend-fastapi
restart: always
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: swegram_corpus
MYSQL_USER: swegram
MYSQL_PASSWORD: swegram_pass
MYSQL_HOST: 172.18.0.1
PRODUCTION: 1
ports:
- "8000:8000"
entrypoint: >
bash -c "cd /root && sleep 30 && python3 app_run.py"
networks:
- swegram-network
profiles:
- client
- backend
vue-nginx-proxy:
build: frontend
depends_on:
- db
- backend
container_name: vue-nginx
restart: always
ports:
- "80:80"
networks:
- swegram-network
profiles:
- client
networks:
swegram-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.18.0.0/16
gateway: 172.18.0.1