updated examples
This commit is contained in:
parent
c67342df26
commit
d7e0fa821b
@ -1,7 +1,3 @@
|
||||
VIRTUAL_HOST=
|
||||
LETSENCRYPT_HOST=
|
||||
LETSENCRYPT_EMAIL=
|
||||
|
||||
DEBUG=1
|
||||
ALLOWED_HOSTS=*
|
||||
SECRET_KEY=
|
||||
|
@ -1,46 +0,0 @@
|
||||
|
||||
|
||||
# Uncomment and edit the services as you like in here
|
||||
# there are several examples available
|
||||
# The docker-compose.override.yml is merged with docker-compose.yml on runtime
|
||||
|
||||
#####################
|
||||
# WITH NGINX-PROXY #
|
||||
#####################
|
||||
|
||||
# version: "3"
|
||||
# services:
|
||||
# nginx_recipes:
|
||||
# image: nginx:mainline-alpine
|
||||
# restart: always
|
||||
# env_file:
|
||||
# - ./.env
|
||||
# volumes:
|
||||
# - ./nginx/conf.d:/etc/nginx/conf.d
|
||||
# - ./staticfiles:/static
|
||||
# - ./mediafiles:/media
|
||||
# networks:
|
||||
# - default
|
||||
# - nginx-proxy
|
||||
# networks:
|
||||
# nginx-proxy:
|
||||
# external:
|
||||
# name: nginx-proxy
|
||||
|
||||
|
||||
#######################
|
||||
# WITH TREAFIK-PROXY #
|
||||
#######################
|
||||
|
||||
# version: "3"
|
||||
# services:
|
||||
# web_recipes:
|
||||
# labels: # This lables are only examples!
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
|
||||
# - "traefik.http.routers.recipes.entrypoints=web_secure"
|
||||
# - "traefik.http.routers.recipes.tls.certresolver=le_resolver"
|
||||
|
||||
# networks:
|
||||
# traefik: # This is you external traefic network
|
||||
# external: true
|
@ -1,29 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
db_recipes:
|
||||
restart: always
|
||||
image: postgres:11-alpine
|
||||
volumes:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
|
||||
web_recipes:
|
||||
build: .
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./staticfiles:/opt/recipes/staticfiles
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
ports:
|
||||
- 80:8080
|
||||
depends_on:
|
||||
- db_recipes
|
||||
networks:
|
||||
- default
|
||||
|
||||
networks:
|
||||
default:
|
@ -2,3 +2,10 @@ This is a docker compose example when using [jwilder's nginx reverse proxy](http
|
||||
in combination with [jrcs's letsencrypt companion](https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/).
|
||||
|
||||
Please refer to the appropriate documentation on how to setup the reverse proxy and networks.
|
||||
|
||||
Remember to add the appropriate environment variables to `.env` file:
|
||||
```
|
||||
VIRTUAL_HOST=
|
||||
LETSENCRYPT_HOST=
|
||||
LETSENCRYPT_EMAIL=
|
||||
```
|
@ -1,19 +1,43 @@
|
||||
version: "3"
|
||||
services:
|
||||
nginx_recipes:
|
||||
image: nginx:mainline-alpine
|
||||
db_recipes:
|
||||
restart: always
|
||||
image: postgres:11-alpine
|
||||
volumes:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
|
||||
web_recipes:
|
||||
image: vabene1111/recipes:test
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./staticfiles:/static
|
||||
- ./mediafiles:/media
|
||||
- ./staticfiles:/opt/recipes/staticfiles
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
networks:
|
||||
- default
|
||||
- nginx-proxy
|
||||
|
||||
nginx_recipes:
|
||||
image: nginx:mainline-alpine
|
||||
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
|
5
docs/docker/plain/README.md
Normal file
5
docs/docker/plain/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
This is the most basic configuration to run this image with docker compose.
|
||||
|
||||
> **NOTE**: There is no proxy included in this configuration and gunicorn is directly exposed as the webserver which is
|
||||
> not recommended by according to the [gunicorn devs](https://serverfault.com/questions/331256/why-do-i-need-nginx-and-something-like-gunicorn).
|
||||
> It is higly recommended to configure an additional proxy (nginx, ...) in front of this.
|
@ -7,9 +7,11 @@ services:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
|
||||
web_recipes:
|
||||
build: .
|
||||
image: vabene1111/recipes:test
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
@ -20,3 +22,8 @@ services:
|
||||
- 80:8080
|
||||
depends_on:
|
||||
- db_recipes
|
||||
networks:
|
||||
- default
|
||||
|
||||
networks:
|
||||
default:
|
@ -2,39 +2,34 @@ version: "3"
|
||||
services:
|
||||
db_recipes:
|
||||
restart: always
|
||||
image: "postgres:11-alpine"
|
||||
image: postgres:11-alpine
|
||||
volumes:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
|
||||
web_recipes:
|
||||
build: .
|
||||
image: vabene1111/recipes:test
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
command: "gunicorn --bind 0.0.0.0:8080 recipes.wsgi"
|
||||
- ./.env
|
||||
volumes:
|
||||
- .:/Recipes
|
||||
- ./staticfiles:/opt/recipes/staticfiles
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
|
||||
nginx_recipes:
|
||||
image: "nginx"
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./staticfiles:/static
|
||||
- ./mediafiles:/media
|
||||
labels:
|
||||
- db_recipes
|
||||
labels: # This lables are only examples!
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
|
||||
- "traefik.http.routers.recipes.entrypoints=web_secure"
|
||||
- "traefik.http.routers.recipes.tls.certresolver=le_resolver"
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: traefik
|
||||
default:
|
||||
traefik: # This is you external traefic network
|
||||
external: true
|
Loading…
Reference in New Issue
Block a user