Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jacotsu
uus
Commits
200b71db
Commit
200b71db
authored
Feb 06, 2019
by
JackV
Browse files
Docker integration
parent
40c289dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
0 → 100644
View file @
200b71db
FROM
alpine:latest
RUN
apk add
-U
python3 py3-gunicorn
RUN
mkdir
/uus
WORKDIR
/uus
COPY
uus.py /uus
COPY
admin /uus
COPY
requirements.txt /uus
RUN
pip3
install
-r
requirements.txt
EXPOSE
8000
ENTRYPOINT
gunicorn -b 0.0.0.0 -w 4 uus:app
docker-compose.yml
0 → 100644
View file @
200b71db
version
:
'
3'
services
:
uus
:
image
:
uus
restart
:
always
environment
:
-
REDIS_URL=redis://redis_db:6379/0
depends_on
:
-
redis_db
ports
:
-
"
9001:8000"
redis_db
:
image
:
redis:alpine
restart
:
always
entrypoint
:
redis-server --appendonly yes
volumes
:
-
/data:/opt/uus
uus.py
View file @
200b71db
...
...
@@ -8,7 +8,7 @@ import os
app
=
flask
.
Flask
(
__name__
)
auth
=
HTTPBasicAuth
()
app
.
config
[
'REDIS_URL'
]
=
'redis://127.0.0.1:6379/0'
app
.
config
[
'REDIS_URL'
]
=
os
.
environ
.
get
(
'REDIS_URL'
,
'redis://127.0.0.1:6379/0'
)
redis_store
=
FlaskRedis
()
redis_store
.
init_app
(
app
)
pure_string
=
re
.
compile
(
r
'^\w+$'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment