docker first try

This commit is contained in:
vabene1111
2018-11-07 13:31:26 +01:00
parent be32b3f63e
commit 484f7c556e
7 changed files with 113 additions and 0 deletions

43
docker-compose.yml Normal file
View File

@@ -0,0 +1,43 @@
version: "3"
services:
db_recipes:
restart: always
image: "postgres:10.3-alpine"
volumes:
- /usr/src/recipes/postgresql:/var/lib/postgresql/data
env_file:
- ./.env.secret
networks:
- default
web_recipes:
build: .
restart: always
env_file:
- ./.env.secret
command: "gunicorn --bind 0.0.0.0:8080 Recipes.wsgi"
volumes:
- .:/Recipes
depends_on:
- db_recipes
networks:
- default
nginx_recipes:
image: "nginx"
restart: always
env_file:
- ./.env
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./staticfiles:/static
- ./mediafiles:/media
networks:
- default
- nginx-proxy
networks:
default:
nginx-proxy:
external:
name: nginx-proxy