-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
76 lines (76 loc) · 1.73 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
version: '3.8'
services:
db:
build:
context: ./db
dockerfile: Dockerfile
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=balancer
- POSTGRES_PASSWORD=balancer
- POSTGRES_DB=balancer_dev
ports:
- "5432:5432"
networks:
app_net:
ipv4_address: 192.168.0.2
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: balancer
# PGADMIN_LISTEN_PORT = 80
# volumes:
# - ./pgadmin-data:/var/lib/pgadmin
# # PGADMIN_LISTEN_PORT = 80
ports:
- "5050:80"
networks:
app_net:
ipv4_address: 192.168.0.4
backend:
image: balancer-backend
build: ./server
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
env_file:
- ./config/env/env.dev
depends_on:
- db
volumes:
- ./server:/usr/src/server
networks:
app_net:
ipv4_address: 192.168.0.3
frontend:
image: balancer-frontend
build:
context: frontend
dockerfile: Dockerfile
args:
- IMAGE_NAME=balancer-frontend
ports:
- "3000:3000"
environment:
- CHOKIDAR_USEPOLLING=true
# - VITE_API_BASE_URL=https://balancertestsite.com/
volumes:
- "./frontend:/usr/src/app:delegated"
- "/usr/src/app/node_modules/"
depends_on:
- backend
networks:
app_net:
ipv4_address: 192.168.0.5
volumes:
postgres_data:
networks:
app_net:
ipam:
driver: default
config:
- subnet: "192.168.0.0/24"
gateway: 192.168.0.1