updated examples
This commit is contained in:
parent
c67342df26
commit
d7e0fa821b
@ -1,7 +1,3 @@
|
|||||||
VIRTUAL_HOST=
|
|
||||||
LETSENCRYPT_HOST=
|
|
||||||
LETSENCRYPT_EMAIL=
|
|
||||||
|
|
||||||
DEBUG=1
|
DEBUG=1
|
||||||
ALLOWED_HOSTS=*
|
ALLOWED_HOSTS=*
|
||||||
SECRET_KEY=
|
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/).
|
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.
|
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,5 +1,28 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
|
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:
|
||||||
|
- ./staticfiles:/opt/recipes/staticfiles
|
||||||
|
- ./mediafiles:/opt/recipes/mediafiles
|
||||||
|
depends_on:
|
||||||
|
- db_recipes
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
nginx_recipes:
|
nginx_recipes:
|
||||||
image: nginx:mainline-alpine
|
image: nginx:mainline-alpine
|
||||||
restart: always
|
restart: always
|
||||||
@ -14,6 +37,7 @@ services:
|
|||||||
- nginx-proxy
|
- nginx-proxy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
default:
|
||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
external:
|
external:
|
||||||
name: nginx-proxy
|
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
|
- ./postgresql:/var/lib/postgresql/data
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
web_recipes:
|
web_recipes:
|
||||||
build: .
|
image: vabene1111/recipes:test
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
@ -20,3 +22,8 @@ services:
|
|||||||
- 80:8080
|
- 80:8080
|
||||||
depends_on:
|
depends_on:
|
||||||
- db_recipes
|
- db_recipes
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
@ -2,39 +2,34 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
db_recipes:
|
db_recipes:
|
||||||
restart: always
|
restart: always
|
||||||
image: "postgres:11-alpine"
|
image: postgres:11-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgresql:/var/lib/postgresql/data
|
- ./postgresql:/var/lib/postgresql/data
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
web_recipes:
|
web_recipes:
|
||||||
build: .
|
image: vabene1111/recipes:test
|
||||||
restart: always
|
restart: always
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
command: "gunicorn --bind 0.0.0.0:8080 recipes.wsgi"
|
|
||||||
volumes:
|
volumes:
|
||||||
- .:/Recipes
|
- ./staticfiles:/opt/recipes/staticfiles
|
||||||
|
- ./mediafiles:/opt/recipes/mediafiles
|
||||||
depends_on:
|
depends_on:
|
||||||
- db_recipes
|
- db_recipes
|
||||||
|
labels: # This lables are only examples!
|
||||||
nginx_recipes:
|
|
||||||
image: "nginx"
|
|
||||||
restart: always
|
|
||||||
env_file:
|
|
||||||
- ./.env
|
|
||||||
volumes:
|
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
||||||
- ./staticfiles:/static
|
|
||||||
- ./mediafiles:/media
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
|
- "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
|
||||||
- "traefik.http.routers.recipes.entrypoints=web_secure"
|
- "traefik.http.routers.recipes.entrypoints=web_secure"
|
||||||
- "traefik.http.routers.recipes.tls.certresolver=le_resolver"
|
- "traefik.http.routers.recipes.tls.certresolver=le_resolver"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- traefik
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
external:
|
traefik: # This is you external traefic network
|
||||||
name: traefik
|
external: true
|
Loading…
Reference in New Issue
Block a user