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
OSUG
RESIF
ws-timeseries
Commits
afdbc92a
Commit
afdbc92a
authored
May 27, 2021
by
Jerome Touvier
Browse files
docker update
parent
e6c7bc2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
afdbc92a
FROM
gricad-registry.univ-grenoble-alpes.fr/osug/resif/resif_docker/obspy:1.2.1-python-3.8-slim
# Installation de l'application Flask
# Building heavy python dependencies as a first stage
# will build ospy for instance
FROM
python:3.9-slim AS python-deps
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
gcc libc6-dev
COPY
requirements.txt /
RUN
pip
install
--no-cache-dir
-r
/requirements.txt
RUN
pip
install
--no-cache-dir
gunicorn
WORKDIR
/app
FROM
python:3.9-slim
MAINTAINER
RESIF DC <resif-dc@univ-grenoble-alpes.fr>
# Get the dependencies from previous stage
COPY
--from=python-deps /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
RUN
pip
install
--no-cache-dir
gunicorn
WORKDIR
/appli
COPY
start*.py ./
COPY
apps ./apps/
COPY
templates ./templates/
COPY
static ./static/
USER
1000
ENTRYPOINT
["gunicorn"]
ENTRYPOINT
["gunicorn"
, "--bind", "0.0.0.0:8000"
]
CMD
["start_timeseries:app"]
apps/timeseries/output.py
View file @
afdbc92a
...
...
@@ -154,8 +154,8 @@ def get_file(params, st):
(
file_type
,
file_ext
)
=
get_file_type
(
params
)
(
start
,
end
)
=
get_bounds
(
st
)
start
=
UTCDateTime
(
start
).
strftime
(
"%Y
-
%m
-
%dT%H
:
%M
:
%S
.%f"
)[:
-
3
]
+
"Z"
end
=
UTCDateTime
(
end
).
strftime
(
"%Y
-
%m
-
%dT%H
:
%M
:
%S
.%f"
)[:
-
3
]
+
"Z"
start
=
UTCDateTime
(
start
).
strftime
(
"%Y%m%dT%H%M%S
"
)
+
"Z"
end
=
UTCDateTime
(
end
).
strftime
(
"%Y%m%dT%H%M%S
"
)
+
"Z"
period
=
"."
.
join
([
start
,
end
])
fname
=
"resifws-timeseries"
...
...
requirements.txt
View file @
afdbc92a
bokeh
==2.2.3
Flask
==1.1.2
Flask
==2.0.1
obspy
==1.2.2
psycopg2-binary
==2.8.6
bokeh
==2.3.2
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