include docker-compose yamls
This commit is contained in:
parent
3a07c4ca3e
commit
29e6f6049e
2 changed files with 60 additions and 0 deletions
37
docker-compose.prod.yml
Normal file
37
docker-compose.prod.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: ./services/web
|
||||
dockerfile: Dockerfile.prod
|
||||
command: gunicorn --bind 0.0.0.0:5000 manage:app
|
||||
volumes:
|
||||
- static_volume:/home/app/web/project/static
|
||||
- media_volume:/home/app/web/project/media
|
||||
expose:
|
||||
- 5000
|
||||
env_file:
|
||||
- ./.env.prod
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:13-alpine
|
||||
volumes:
|
||||
- postgres_data_prod:/var/lib/postgresql/data/
|
||||
env_file:
|
||||
- ./.env.prod
|
||||
nginx:
|
||||
build: ./services/nginx
|
||||
volumes:
|
||||
- static_volume:/home/app/web/project/static
|
||||
- media_volume:/home/app/web/project/media
|
||||
ports:
|
||||
- 1337:80
|
||||
depends_on:
|
||||
- web
|
||||
|
||||
volumes:
|
||||
postgres_data_prod:
|
||||
static_volume:
|
||||
media_volume:
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: ./services/web
|
||||
command: python manage.py run -h 0.0.0.0
|
||||
volumes:
|
||||
- ./services/web/:/usr/src/app/
|
||||
ports:
|
||||
- 5000:5000
|
||||
env_file:
|
||||
- ./.env.dev
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:13-alpine
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
env_file:
|
||||
- ./.env.dev
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
Loading…
Reference in a new issue