https://github.com/monogramm/docker-dodock
:whale: :snake: Docker image for Dodock
https://github.com/monogramm/docker-dodock
docker dodock frappe python
Last synced: about 1 month ago
JSON representation
:whale: :snake: Docker image for Dodock
- Host: GitHub
- URL: https://github.com/monogramm/docker-dodock
- Owner: Monogramm
- License: agpl-3.0
- Created: 2020-12-01T17:02:14.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-05-16T20:19:19.000Z (about 4 years ago)
- Last Synced: 2025-08-24T18:39:29.429Z (10 months ago)
- Topics: docker, dodock, frappe, python
- Language: Shell
- Homepage: https://gitlab.com/dokos/dodock
- Size: 144 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![License: AGPL v3][uri_license_image]][uri_license]
[](https://github.com/Monogramm/docker-dodock/actions)
[](https://hub.docker.com/r/monogramm/docker-dodock/)
[](https://hub.docker.com/r/monogramm/docker-dodock/)
[](https://microbadger.com/images/monogramm/docker-dodock)
[](https://microbadger.com/images/monogramm/docker-dodock)
# Dodock custom Docker container
:whale: Docker image for Dodock applications.
This image was inspired by Monogramm's Frappe container and Dokos docker container:
- [Monogramm/docker-frappe](https://github.com/Monogramm/docker-frappe)
- [Dokos/dokidocker](https://gitlab.com/dokos/dokidocker)
The concept is the following:
- no need to provide any configuration file: everything will be automatically generated by the container through environnment variables
- the application container sets all the environment variables, the other containers wait for setup to be done
- provide postgresql compatibility
- the container detects and execute migration automatically
- the container detects missing modules / apps and remove them automatically
- allow before and after '_node_' custom scripts
Check image [Monogramm/docker-dokos](https://github.com/Monogramm/docker-dokos) to see how to expand this image and build dodock apps.
## What is Dodock
Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for Dokos.
> [dokos.io](https://dokos.io/)
> [gitlab dodock](https://gitlab.com/dokos/dodock)
## Supported tags
- develop-alpine3.12 develop-alpine3.12 alpine3.12 (`images/develop/alpine3.12/Dockerfile`)
- develop-slim-buster develop-slim-buster slim-buster develop develop latest (`images/develop/slim-buster/Dockerfile`)
## Auto configuration via environment variables
The image supports auto configuration via environment variables.
### Docker entrypoint configuration
```sh
# The docker "node" type. Defines the behavior of the container.
# This can either be set through command argument or environment variable.
# Can be one of the following:
# doctor
# setup
# setup-database
# build-apps
# update
# backup
# restore
# migrate
# app
# scheduler
# worker
# worker-long
# worker-short
# node-socketio
WORKER_TYPE=
# Time in seconds container will wait for DB to be up
DOCKER_DB_TIMEOUT=120
# MariaDb hosts allowed to log to the DB.
# Only needed with mariadb when database created by dodock (dodock restricts to install IP by default).
# In this case, use 172.%.%.% to allow any container on docker network
DOCKER_DB_ALLOWED_HOSTS=
# Time in seconds container will wait for apps to be setup
DOCKER_APPS_TIMEOUT=600
# Time in seconds container will wait for sites to be setup
DOCKER_SITES_TIMEOUT=900
# Set to 1 to enable display of all log files if container crashes
DOCKER_DEBUG=
DOCKER_GUNICORN_BIND_ADDRESS=0.0.0.0
DOCKER_GUNICORN_PORT=8000
DOCKER_GUNICORN_WORKERS=4
DOCKER_GUNICORN_TIMEOUT=120
DOCKER_GUNICORN_LOGLEVEL=info
# If you want to enable SSL for Dokos App
# If using Let's Encrypt, you should set properties like this:
# certfile=/etc/letsencrypt/live/my.domain.com/fullchain.pem
# keyfile=/etc/letsencrypt/live/my.domain.com/privkey.pem
DOCKER_GUNICORN_CERTFILE=
DOCKER_GUNICORN_KEYFILE=
```
### Dodock configuration
```sh
# List of dodock apps (space separated) to init on startup (bench install-app)
DODOCK_APP_INIT=
# Reset apps.txt
# If set to 1, apps.txt older content will be removed on startup and only contain the content of DODOCK_APP_INIT
DODOCK_APP_RESET=
# Protected apps that shall never be removed automatically
# Mostly used to secure that dodock and dokos are not removed due to misconfiguration
DODOCK_APP_PROTECTED=dodock
# Default protocol. Should either be http (default value) or https when using SSL.
DODOCK_DEFAULT_PROTOCOL=http
# Default site
DODOCK_DEFAULT_SITE=
# Default HTTP port. Should either be 80 (default value) or 443 when using SSL or any custom port defined for the NGinx reverse proxy.
DODOCK_HTTP_PORT=80
# Default backend port. Should either be 80 (default value) or any custom port defined for the app backend.
DODOCK_WEBSERVER_PORT=80
# Default socketion port. Should either be 3000 (default value) or 80 (usual value for prod) or any custom port defined for the socketio service.
DODOCK_SOCKETIO_PORT=3000
# Remove all sites data on startup if set to 1
# This should only be used for dev / test environments
DODOCK_RESET_SITES=
# Reinstall database
# If set to 1, database will be resinstalled. This should only be used for dev / test environments
DODOCK_REINSTALL_DATABASE=
# Build options passed to the bench build command
# Can be used with --restore to copy the public assets instead of symlinking them
DODOCK_BUILD_OPTIONS=
DODOCK_LOGGING=1
GOOGLE_ANALYTICS_ID=
DEVELOPER_MODE=0
ALLOW_TESTS=0
SERVER_SCRIPT_ENABLED=0
ADMIN_PASSWORD=dodock
# Encryption key
# Leave empty to generate a random base64 32 key
ENCRYPTION_KEY=
```
### Database configuration
```sh
# DB type. Can either be mariadb or postgresql
DB_TYPE=mariadb
DB_HOST=db
DB_PORT=3306
# DB name. Is also used by dodock for the user name associated
DB_NAME=dodock
DB_PASSWORD=youshouldoverwritethis
# DB root login. Only used for postgresql
DB_ROOT_LOGIN=root
# DB root password. Mandatory
DB_ROOT_PASSWORD=mariadb_root_password
```
### Mail configuration
```sh
MAIL_MUTED=false
MAIL_HOST=mail
MAIL_PORT=587
MAIL_USE_SSL=tls
MAIL_LOGIN=dodock-mail
MAIL_PASSWORD=youshouldoverwritethis
```
### Redis configuration
```sh
REDIS_CACHE_HOST=redis_cache
REDIS_QUEUE_HOST=redis_queue
REDIS_SOCKETIO_HOST=redis_socketio
```
## How to run this image
This image does not contain the database for Dodock. You need to use either an existing database or a database container.
This image is designed to be used in a micro-service environment using docker-compose. There are basically 2 variants of the image you can choose from: `alpine` or `debian`.
### Running this image with docker-compose
- Select the version closest to what you want in the images folder
- You can comment the `build` lines, uncomment the `image` lines and edit versions to download prebuilt docker container.
- Feel free to edit variables defined in `.env` as you see fit.
- Run the docker-compose with `docker-compose up -d` and that's it.
- Now, go to to access the first run installation wizard.
## Questions / Issues
If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/Monogramm/docker-dodock) and write an issue.
[uri_license]: http://www.gnu.org/licenses/agpl.html
[uri_license_image]: https://img.shields.io/badge/License-AGPL%20v3-blue.svg