diff options
| author | 2019-06-06 11:16:54 -0700 | |
|---|---|---|
| committer | 2019-06-22 13:35:49 -0700 | |
| commit | cbc375b4a84aa07554b31b1608a82091ba671a58 (patch) | |
| tree | 0d0f0bab93f910f897acfe08957ab1b6189a2c2d /Pipfile | |
| parent | Use a custom Gunicorn access log format (diff) | |
Add support for development to Docker images
* Venv image can sync dev dependencies
* Copy tests to image
* Add a Pipenv script for running a development shell in a container
* Add Pipenv scripts for building dev images
Diffstat (limited to '')
| -rw-r--r-- | Pipfile | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -32,14 +32,36 @@ precommit = "pre-commit install" test = "pytest tests --cov . --cov-report term-missing -v" report = "pytest tests --cov . --cov-report=html" snekbox = """ - gunicorn - -w 2 - -b 0.0.0.0:8060 - --logger-class snekbox.GunicornLogger - --access-logformat '%(m)s %(U)s%(q)s %(s)s %(b)s %(L)ss' - --access-logfile - + gunicorn \ + -w 2 \ + -b 0.0.0.0:8060 \ + --logger-class snekbox.GunicornLogger \ + --access-logformat '%(m)s %(U)s%(q)s %(s)s %(b)s %(L)ss' \ + --access-logfile - \ snekbox.api.app """ +build-venv-dev = """ + docker build \ + -t pythondiscord/snekbox-venv:dev \ + -f docker/venv.Dockerfile + --build-arg DEV=1 \ + . +""" +devsh = """ + /usr/bin/env sh -c ' + docker run \ + -it \ + --rm \ + --privileged \ + --network host \ + -h pdsnk-dev \ + -e PIPENV_PIPFILE="/snekbox/Pipfile" \ + -v "$(pwd)":/snekbox-local \ + -w "/snekbox-local" \ + --entrypoint /bin/sh \ + pythondiscord/snekbox-venv:dev + ' +""" buildbox = "docker build -t pythondiscord/snekbox:latest -f docker/Dockerfile ." pushbox = "docker push pythondiscord/snekbox:latest" buildboxbase = "docker build -t pythondiscord/snekbox-base:latest -f docker/base.Dockerfile ." |