Git Product home page Git Product logo

docker-etesync-server's Introduction

ETESync Sever Docker Images

Build and Push Build and Push 0.3.0

Docker image for ETESync based on the server repository by Tom Hacohen.

Tags

The following tags are built on latest python image and master branch of ETESync Server

Starting on v0.3.0 ther will be builds base stable published version of ETESync

  • 0.3.0
  • 0.3.0-slim
  • 0.3.0-alpine

Usage

docker run -d -e SUPER_USER=admin -p 80:3735 -v /path/on/host:/data victorrds/etesync

Create a container running ETESync using http protocol.

Volumes

/data: database file location

Ports

This image exposes the 3735 TCP Port

Settings and Customization

Custom settings can be added to /etesync/etesync_site_settings.py, this file overrides the default settings.py, mostly for Django: The Web framework options, this image also uses the some environment variables to set some of these options.

Environment Variables

  • SERVER: Defines how the container will serve the application, the options are:
    • http Runs using HTTP protocol, this is the default mode.
    • https same as above but with TLS/SSL support, see below how to use with your own certificates.
    • uwsgi start using uWSGI native protocol, for reverse-proxies/load balances, such as nginx, that support this protocol
    • http-socket Similar to the first option, but without uWSGI HTTP router/proxy/load-balancer, this recommended for any reverse-proxies/load balances, that support HTTP protocol, like traefik
    • django-server this mode uses the embedded django http server, ./manage.py runserver :3735, this is not recommeded but can be useful for debugging
  • PUID and PGID: set user and group when running using uwsgi, default: 1000;
  • ETESYNC_DB_PATH: Location of the ETESync SQLite database. default: /data volume;
  • AUTO_MIGRATE: Trigger database update/migration every time the container starts, default: false , more details below.
  • SECRET_FILE: Defines file that contains the value for django's SECRET_KEY if not found a new one is generated. default: /etesync/secret.txt.
  • ALLOWED_HOSTS: the ALLOWED_HOSTS settings, must be valid domains separated by ,. default: * (not recommended for production);
  • LANGUAGE_CODE: Django language code, default: en-us;
  • USE_TZ: Force Django to use time-zone-aware datetime objects internally, defaults to false;
  • TIME_ZONE: time zone, defaults to UTC;
  • DEBUG: enables Django Debug mode, not recommended for production defaults to False;

How to create a Superuser

Method 1 Environment Variables on first run.

If these variables are set on the first run it will trigger the creation of a superuser after the database is ready.

  • SUPER_USER: Username of the django superuser (only used if no previous database is found);
    • SUPER_PASS: Password of the django superuser (optional, one will be generated if not found);
    • SUPER_EMAIL: Email of the django superuser (optional);

Method 2 Python Shell

At any moment after the database is ready, you can create a new superuser by running and following the prompts:

docker exec -it {container_name} python manage.py createsuperuser

Updgrade application and database

If AUTO_MIGRATE is not set you can update by running:

docker exec -it {container_name} python manage.py migrate

Using uWSGI with HTTPS

If you want to run ETESync Server HTTPS using uWSGI you need to pass certificates or the image will generate a self-sign certificate for localhost.

By default ETESync will look for the files /certs/crt.pem and /certs/key.pem, if for some reason you change this location change the X509_CRT and X509_KEY environment variables

Serving Static Files

When behind a reverse-proxy/http server compatible uwsgi protocol the static files are located at /var/www/etesync/static, files will be copied if missing on start.

docker-etesync-server's People

Contributors

victor-rds avatar kumy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.