diff --git a/docs/docker/plain/docker-compose.yml b/docs/docker/plain/docker-compose.yml index 3c6bebb82..1f707e7b5 100644 --- a/docs/docker/plain/docker-compose.yml +++ b/docs/docker/plain/docker-compose.yml @@ -7,8 +7,6 @@ services: - ./postgresql:/var/lib/postgresql/data env_file: - ./.env - networks: - - default web_recipes: image: vabene1111/recipes @@ -22,8 +20,13 @@ services: - 80:8080 depends_on: - db_recipes - networks: - - default -networks: - default: \ No newline at end of file + nginx_recipes: + image: nginx:mainline-alpine + restart: always + env_file: + - ./.env + volumes: + - ./nginx/conf.d:/etc/nginx/conf.d + - ./staticfiles:/static + - ./mediafiles:/media diff --git a/docs/docker/plain/nginx/conf.d/Recipes.conf b/docs/docker/plain/nginx/conf.d/Recipes.conf new file mode 100644 index 000000000..dd0216362 --- /dev/null +++ b/docs/docker/plain/nginx/conf.d/Recipes.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name localhost; + + client_max_body_size 16M; + + # serve media files + location /media/ { + alias /media/; + } + # pass requests for dynamic content to gunicorn + location / { + proxy_set_header Host $host; + proxy_pass http://web_recipes:8080; + } +} \ No newline at end of file