-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
109 lines (102 loc) · 1.88 KB
/
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
services:
# Frontend
vite:
container_name: vite
build: frontend
env_file:
- ./.env.dev
ports:
- 5173
develop:
watch:
- action: sync
path: frontend
target: /usr/src/app
networks:
- transcendence
# Backend
django:
container_name: django
build: backend
ports:
- "8000:8000"
env_file:
- ./.env.dev
depends_on:
- postgres
- redis
- ganache
develop:
watch:
- action: sync
path: backend
target: /usr/src/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- media-data:/vol/media
- static-data:/vol/static
- contract_data:/usr/src/app/dapp_storage/json
networks:
- transcendence
# Nginx
nginx:
container_name: nginx
volumes:
- static-data:/vol/static
- media-data:/vol/media
build: ./nginx
ports:
# - 80:80
- 443:443
depends_on:
- django
- vite
restart: always
networks:
- transcendence
# PostgreSQL
postgres:
image: postgres
container_name: postgres
ports:
- 5432
restart: on-failure
environment:
POSTGRES_DB: postgres_db
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: postgres_pass
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- transcendence
# Redis
redis:
image: "redis:7"
container_name: redis
ports:
- 6379
networks:
- transcendence
# Ganache
ganache:
container_name: ganache
build:
context: backend
dockerfile: Dockerfile.ganache
ports:
- 8545
volumes:
- ganache_data:/data
networks:
- transcendence
volumes:
postgres_data:
media-data:
static-data:
ganache_data:
contract_data:
networks:
transcendence:
name: transcendence