update docker build

This commit is contained in:
felinae98 2021-12-08 14:09:00 +08:00
parent bbc891e964
commit d1959283cb
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
5 changed files with 15 additions and 0 deletions

View File

@ -50,6 +50,12 @@ workflows:
only: /^v.*/ only: /^v.*/
- docker/publish: &docker-push - docker/publish: &docker-push
name: "docker/publish-release" name: "docker/publish-release"
dockerfile: docker/Dockerfile_with_frontend
after-checkout:
- attach_workspace:
at: .
- restore_cache:
key: frontend_build_res-{{ checksum "frontend.hash" }}
requires: requires:
- test - test
filters: filters:

View File

@ -0,0 +1,9 @@
FROM python:3.9
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
WORKDIR /app
COPY ./pyproject.toml ./poetry.lock* /app/
RUN poetry install --no-root --no-dev
ADD src /app/src
ADD bot.py /app/
ENV HOST=0.0.0.0
CMD ["python", "bot.py"]