From aa495250c9d9ce0eb32231ba6e1b9245e9b7561c Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 4 Jan 2021 09:41:26 +0100 Subject: [PATCH] further work on documentation --- docs/install/docker/README.md | 9 ----- docs/install/docker/docker.md | 68 +++++++++++++++++++++++++++++++++++ mkdocs.yml | 12 ++++++- 3 files changed, 79 insertions(+), 10 deletions(-) delete mode 100644 docs/install/docker/README.md create mode 100644 docs/install/docker/docker.md diff --git a/docs/install/docker/README.md b/docs/install/docker/README.md deleted file mode 100644 index acada353..00000000 --- a/docs/install/docker/README.md +++ /dev/null @@ -1,9 +0,0 @@ -It is possible to install this application using many docker configurations. - -:warning: Please note that some examples here are -given because some people want to use them even tough they are not recommended! - -Please read the instructions/notes on each example carefully and decide if this is the way for you. - - -> When in doubt, choose either **nginx-proxy** or **traefik-nginx** \ No newline at end of file diff --git a/docs/install/docker/docker.md b/docs/install/docker/docker.md new file mode 100644 index 00000000..899568fd --- /dev/null +++ b/docs/install/docker/docker.md @@ -0,0 +1,68 @@ +It is possible to install this application using many docker configurations. + +!!! warning + Please note that some examples here are given + because some people want to use them even tough they are not recommended! + +Please read the instructions/notes on each example carefully and decide if this is the way for you. + +## Docker +The docker image (`vabene1111/recipes`) simply exposes the application on port `8080`. + +It can be run using +```shell +docker run -d \ + -v ./staticfiles:/opt/recipes/staticfiles \ + -v ./mediafiles:/opt/recipes/mediafiles \ + -p 80:8080 \ + -e SECRET_KEY= + -e DB_ENGINE=django.db.backends.postgresql + -e POSTGRES_HOST=db_recipes + -e POSTGRES_PORT=5432 + -e POSTGRES_USER=djangodb + -e POSTGRES_PASSWORD= + -e POSTGRES_DB=djangodb + vabene1111/recipes +``` + +Please make sure, if you run your image this way, to consult the [.env.template](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template) +file in the GitHub repository to verify if additional environment variables are required for your setup. + +## Docker Compose +The main and also recommended installation option is to install this application using docker compose. + +```yaml +version: "3" +services: + db_recipes: + restart: always + image: postgres:11-alpine + volumes: + - ./postgresql:/var/lib/postgresql/data + env_file: + - ./.env + + web_recipes: + image: vabene1111/recipes + restart: always + env_file: + - ./.env + volumes: + - ./staticfiles:/opt/recipes/staticfiles + - ./mediafiles:/opt/recipes/mediafiles + depends_on: + - db_recipes + + nginx_recipes: + image: nginx:mainline-alpine + restart: always + ports: + - 80:80 + env_file: + - ./.env + volumes: + - ./nginx/conf.d:/etc/nginx/conf.d + - ./staticfiles:/static + - ./mediafiles:/media + +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 4e22087c..e150e3ea 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,4 +11,14 @@ theme: logo: cookbook/static/favicon.png favicon: cookbook/static/favicon.ico icon: - repo: fontawesome/brands/github \ No newline at end of file + repo: fontawesome/brands/github + +markdown_extensions: + - admonition + - pymdownx.highlight + - pymdownx.superfences + +nav: + - Home: 'index.md' + - Installation: + - Docker: install/docker/docker.md \ No newline at end of file