Skip to content
Snippets Groups Projects
Commit a74c69d8 authored by Benjamin Schmidt's avatar Benjamin Schmidt
Browse files

Docker deployment

parent 20c34ae5
No related branches found
No related tags found
No related merge requests found
# deploy the dash app darwin-dashboard via gunicorn and install the requirements
# for the app
#
FROM python:3.9-slim
# set the working directory
WORKDIR /usr/src/darwin-dashboard
# copy the requirements file
COPY pyproject.toml poetry.lock ./usr/src/darwin-dashboard/
# install the requirements
RUN pip install --upgrade pip
RUN pip install poetry
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev --no-interaction --no-ansi
# copy the darwin-dashboard
COPY . /usr/src/darwin-dashboard
# expose the port
EXPOSE 8050
# run the darwin-dashboard
CMD ["gunicorn", "-b", "0.0.0.0:8050", "darwin-dashboard/app:server"]
\ No newline at end of file
......@@ -20,6 +20,7 @@ def main() -> None:
app,
VALID_USERNAME_PASSWORD_PAIRS,
)
server=app.server
app.layout = create_layout(app)
app.run_server(debug=False)
......
......@@ -16,6 +16,7 @@ matplotlib = "^3.7.1"
pint = "^0.21"
dash-bootstrap-components = "^1.4.1"
dash-auth = "^2.0.0"
gunicorn = "^20.1.0"
[tool.poetry.group.dev.dependencies]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment