Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
121cc0a2
Commit
121cc0a2
authored
4 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
Dockerfile for deployment
parent
afd94d70
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+4
-3
4 additions, 3 deletions
Dockerfile
run_server.sh
+0
-0
0 additions, 0 deletions
run_server.sh
run_worker.sh
+7
-0
7 additions, 0 deletions
run_worker.sh
settings.py
+7
-1
7 additions, 1 deletion
settings.py
with
18 additions
and
4 deletions
Dockerfile
+
4
−
3
View file @
121cc0a2
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"]
This diff is collapsed.
Click to expand it.
run.sh
→
run
_server
.sh
+
0
−
0
View file @
121cc0a2
File moved
This diff is collapsed.
Click to expand it.
run_worker.sh
0 → 100644
+
7
−
0
View file @
121cc0a2
#!/bin/bash
# exit on error
set
-e
# start celeryd
exec
celery worker
--app
helios
--events
--beat
--concurrency
1
This diff is collapsed.
Click to expand it.
settings.py
+
7
−
1
View file @
121cc0a2
...
...
@@ -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
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment