-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 1.05 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
version: '3.4'
services:
db:
restart: always
#restart: unless-stopped
image: postgres:14.1-alpine3.15
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- 5431:5432 # para que sea visible en nuestro entorno local
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
django:
restart: always
container_name: django
build:
context: .
dockerfile: ./local.Dockerfile
command: >
sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=db
- ALLOWED_HOSTS=127.0.0.1, localhost
- DJANGO_KEY=123
- STRIPE_PUBLIC_KEY=env("STRIPE_PUBLIC_KEY")
- STRIPE_PRIVATE_KEY=env("STRIPE_PRIVATE_KEY")
- STRIPE_WEBHOOK_KEY=env("STRIPE_WEBHOOK_KEY")
volumes:
- .:/app
depends_on:
- db