Skip to content
Snippets Groups Projects
Commit 121cc0a2 authored by jan.bednarik's avatar jan.bednarik
Browse files

Dockerfile for deployment

parent afd94d70
No related branches found
No related tags found
No related merge requests found
FROM python:2.7.18-buster
FROM python:3.6
RUN mkdir /app
WORKDIR /app
......@@ -10,9 +10,10 @@ COPY . .
RUN bash -c 'adduser --disabled-login --quiet --gecos app app && \
chmod -R o+r /app/ && \
chmod o+x /app/run.sh'
chmod o+x /app/run_server.sh && \
chmod o+x /app/run_worker.sh'
USER app
EXPOSE 8000
CMD ["bash", "run.sh"]
CMD ["bash", "run_server.sh"]
File moved
#!/bin/bash
# exit on error
set -e
# start celeryd
exec celery worker --app helios --events --beat --concurrency 1
......@@ -14,7 +14,7 @@ def get_from_env(var, default):
else:
return default
DEBUG = (get_from_env('DEBUG', '1') == '1')
DEBUG = (get_from_env('DEBUG', '0') == '1')
# add admins of the form:
# ('Ben Adida', 'ben@adida.net'),
......@@ -287,3 +287,9 @@ if ROLLBAR_ACCESS_TOKEN:
PIRATI_REALM_URL = get_from_env('PIRATI_REALM_URL', '')
PIRATI_CLIENT_ID = get_from_env('PIRATI_CLIENT_ID', '')
PIRATI_CLIENT_SECRET = get_from_env('PIRATI_CLIENT_SECRET', '')
# override defaults
DEFAULT_FROM_EMAIL = "helios@pirati.cz"
DEFAULT_FROM_NAME = "Pirati - Helios Voting"
WELCOME_MESSAGE = "Vítejte na hlasovacím systému České pirátské strany"
SITE_TITLE = "Hlasovací systém Helios | Česká piratská strana"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment