version: '2.4'
services:
django:
image: rg.fr-par.scw.cloud/crocmagnon/blog:latest
build: .
env_file:
- .env
volumes:
- ./db:/db
- staticfiles:/app/staticfiles
- media:/app/media
restart: on-failure
init: true
tty: true
nginx:
image: nginx:1.19.2
ports:
- 8000:80
- staticfiles:/app/static
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- django
tests:
image: rg.fr-par.scw.cloud/crocmagnon/blog:tests
build:
context: .
dockerfile: tests.Dockerfile
staticfiles: {}
media: {}