-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (40 loc) · 1.14 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
version: '3'
services:
# DON'T FORGET TO CHANGE THE XX WITH YOUR PORT
# YOUR_USER WITH YOUR UNIX USER
postgres_db:
image: postgres:14-alpine
container_name: "postgresXX"
environment:
- "POSTGRES_PASSWORD=YourUltraSecretPassword123"
- "POSTGRES_DB=YOUR_USER_db"
- "POSTGRES_USER=YOUR_USER"
ports:
- "100XX:55XX"
volumes:
- "/home/YOUR_USER/postgres:/usr/src/postgres"
networks:
- our-library-net
command: -p 55XX
web:
build: .
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:80XX"
container_name: "djangoXX"
depends_on:
- postgres_db
environment:
- "PSQL_DBNAME=YOUR_USER_db"
- "PSQL_USERNAME=YOUR_USER"
- "PSQL_PASS=SecretPassword123"
- "PSQL_HOST=172.24.0.5" # You must use the command of the README.md file in order to get this IP address
- "PSQL_PORT=55XX"
volumes:
- "YOUR_REPOSITORY_PATH:/usr/src/django/library"
ports:
- "90XX:80XX"
networks:
- our-library-net
networks:
our-library-net:
external: true
driver: bridge