Docker image for ETESync based on the server-skeleton repository.
This build follows some tags of the official Python 3 hub:
- Debian:
- Alpine:
docker run -d -e SUPER_USER=admin -e SUPER_PASS=changeme -p 80:8000 -v /path/on/host:/data victorrds/etesync
Create a container running standalone django server (not recommended for production).
- SERVER: Defines how the container will serve the application, the options are:
standalone
uses start using./manage runserver
,uwsgi
start using uWSGI,uwsgi-http
same as the last but uses HTTP for web servers without wsgi protocol support.
- DJANGO_HOSTS: the ALLOWED_HOSTS settings, must be valid domains separated by
,
. default:*
(not recommended for production); - DJANGO_SECRET: Defines the
SECRET_KEY
used by django, default: generate a new key every time the container starts. - DJANGO_PORT: the server port defaults to the exposed 8000;
- DJANGO_LC: Django language code, default:
en-us
; - TZ: time zone, default
UTC
; - SUPER_USER and SUPER_PASS: Username and password of the django superuser (only used if no database is found, must be used together);
- SUPER_EMAIL: Email of the django superuser (optional, only used if no database is found);
- DEBUG: enable django debug, not recommended for production defaults to False;
- PUID and PGID: set user and group when running using uwsgi, default:
1000
;
/data
: database file location;/var/www/static
: Static files for httpd servers;
Further customization is possible by mounting your own settings file at /etesync/etesync_server/settings.py
, the defult can be found here: settings.py
Here is a example of a docker-compose.yml
file using uwsgi to serve the application and nginx as reverse-proxy and serving static files
version: '2.3'
volumes:
etestatic:
services:
etesync:
container_name: etesync
hostname: etesync
image:victorrds/etesync:latest
expose:
- 8000
volumes:
- etestatic:/var/www/static:rw
environment:
- SERVER=uwsgi
- SUPER_USER=admin
- SUPER_PASS=admin
network_mode: "bridge"
nginx:
container_name: nginx
image: nginx:latest
ports:
- 443:443
- 80:80
volumes:
- etestatic:/var/www/static:ro
- ./nginx-example.conf:/etc/nginx/conf.d/default.conf:ro
links:
- etesync
network_mode: "bridge"
The file nginx-example.conf can be found at the source repository.