diff options
| author | 2020-03-24 09:38:49 -0700 | |
|---|---|---|
| committer | 2020-03-24 09:38:49 -0700 | |
| commit | 2ebea7ecdf146699d68942f4b27478554504fdbd (patch) | |
| tree | 9bdf8d022cf91a409ff7d41005a3d793188ac07b /docker | |
| parent | Merge pull request #68 from python-discord/feat/doc/57/docker-run-cmd (diff) | |
| parent | Fix #66: venv being created in container (diff) | |
Merge pull request #69 from python-discord/bug/ci/66/pipenv-run-creates-venv
Fix venv being created in Dockerfile
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/Dockerfile | 4 | ||||
| -rw-r--r-- | docker/venv.Dockerfile | 5 | 
2 files changed, 6 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 5ef8a88..b6c2f77 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@  FROM pythondiscord/snekbox-venv:latest -ENTRYPOINT ["pipenv", "run"] -CMD ["snekbox"] +ENTRYPOINT ["gunicorn"] +CMD ["-c", "config/gunicorn.conf.py", "snekbox.api.app"]  COPY . /snekbox  WORKDIR /snekbox diff --git a/docker/venv.Dockerfile b/docker/venv.Dockerfile index fe5b10d..5c0fcfc 100644 --- a/docker/venv.Dockerfile +++ b/docker/venv.Dockerfile @@ -6,7 +6,7 @@ ENV PIP_NO_CACHE_DIR=false \      PIPENV_HIDE_EMOJIS=1 \      PIPENV_NOSPIN=1 -COPY Pipfile Pipfile.lock snekbox.cfg /snekbox/ +COPY Pipfile Pipfile.lock /snekbox/  WORKDIR /snekbox  RUN if [ -n "${DEV}" ]; \ @@ -15,3 +15,6 @@ RUN if [ -n "${DEV}" ]; \      else \          pipenv install --deploy --system; \      fi + +# At the end to avoid re-installing dependencies when only a config changes. +COPY config/ /snekbox/config  |