-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) · 1.57 KB
/
docker-compose.yml
File metadata and controls
57 lines (55 loc) · 1.57 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
version: '3'
services:
postgres_db44:
image: postgres:14-alpine
container_name: "postgres${PORT}"
environment:
- "POSTGRES_PASSWORD=${PSQL_PASS}"
- "POSTGRES_DB=${PSQL_DB}"
- "POSTGRES_USER=${PSQL_USER}"
ports:
- "100${PORT}:55${PORT}"
volumes:
- "${POSTGRES_VOLUME_PATH}:/usr/src/postgres"
networks:
- our-library-net
command: "-p 55${PORT}"
redis_service44:
image: redis:7-alpine
container_name: "redis${PORT}"
environment:
- "SOME_REDIS_ENV=whatever"
command: "--port 63${PORT}"
ports:
- "120${PORT}:63${PORT}"
volumes:
- "${REDIS_VOLUME_PATH}:/usr/local/etc/redis"
networks:
- our-library-net
web44:
build: .
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:80${PORT}"
container_name: "django${PORT}"
depends_on:
- postgres_db44
- redis_service44
environment:
- "PSQL_DBNAME=${PSQL_DB}"
- "PSQL_USERNAME=${PSQL_USER}"
- "PSQL_PASS=${PSQL_PASS}"
- "PSQL_HOST=postgres_db${PORT}" # You must use the previous command in order to get this HOST
- "PSQL_PORT=55${PORT}"
- "JWT_TOKEN_TIME=${JWT_TOKEN_TIME}"
- "REDIS_HOST=redis_service${PORT}"
- "REDIS_PORT=63${PORT}"
volumes:
# "RUTA/DEL/SERVIDOR:RUTA/DENTRO/DEL/CONTENEDOR"
- "${DJANGO_VOLUME_PATH}:/usr/src/django/library"
ports:
- "90${PORT}:80${PORT}"
networks:
- our-library-net
networks:
our-library-net:
external: true
driver: bridge