Add docker-compose.yml
This commit is contained in:
parent
2679c2ddd5
commit
61d41a2879
1 changed files with 38 additions and 0 deletions
38
docker-compose.yml
Normal file
38
docker-compose.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
command: gunicorn dynamicweb.wsgi:application --bind [::]:8000
|
||||
volumes:
|
||||
- static_volume:/data/app/app/static
|
||||
- media_volume:/data/app/app/media
|
||||
expose:
|
||||
- 8000
|
||||
env_file:
|
||||
- ./.env
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: postgres:13.0-alpine
|
||||
volumes:
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
- postgres_data:/data/var/lib/postgresql/data/
|
||||
env_file:
|
||||
- ./.env
|
||||
nginx:
|
||||
build: ./nginx
|
||||
volumes:
|
||||
- static_volume:/data/app/app/static
|
||||
- media_volume:/data/app/app/media
|
||||
ports:
|
||||
- 1337:80
|
||||
depends_on:
|
||||
- web
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_volume:
|
||||
media_volume:
|
Loading…
Reference in a new issue