-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
95 lines (89 loc) · 2.11 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
95 lines (89 loc) · 2.11 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
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
version: "3.8"
services:
postgres:
container_name: coobs_postgres
image: postgres:12.1
hostname: postgres
environment:
POSTGRES_DB: coobs
POSTGRES_USER: coobs
POSTGRES_PASSWORD: coobspass
ports:
- "5433:5432"
volumes:
- 'pg_data:/var/lib/postgresql/data'
networks:
- coobs_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U coobs -d coobs"]
interval: 10s
timeout: 5s
retries: 5
backend:
container_name: coobs_backend
build:
context: .
dockerfile: Dockerfile.backend
environment:
- POSTGRES_DB=coobs
- POSTGRES_USER=coobs
- POSTGRES_PASSWORD=coobspass
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- SECRET_KEY=your-secret-key-change-this-in-production
- DEBUG=True
- ALLOWED_HOSTS=*
- EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
- EMAIL_USE_TLS=True
- WEB_PROTOCOL=http
- WEB_URL=localhost:8080
- DEVELOPMENT_MODE=True
ports:
- "8000:8000"
volumes:
- .:/app
networks:
- coobs_network
depends_on:
postgres:
condition: service_healthy
command: >
sh -c "python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
frontend:
container_name: coobs_frontend
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- "8080:8080"
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- coobs_network
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true # Para hot reload en Docker
command: npm run start
pgadmin:
container_name: coobs_pgadmin
image: dpage/pgadmin4:6.21
environment:
- PGADMIN_DEFAULT_EMAIL=admin@fiqus.coop
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5050:80"
volumes:
- 'pgadmin_data:/var/lib/pgadmin'
networks:
- coobs_network
depends_on:
- postgres
networks:
coobs_network:
driver: bridge
volumes:
pg_data:
pgadmin_data: