Compare commits
base: 3wordchant/capsul-flask:docker
3wordchant/capsul-flask:master
3wordchant/capsul-flask:cyberia-prod
3wordchant/capsul-flask:tests
3wordchant/capsul-flask:yolocolo
3wordchant/capsul-flask:tests-with-logs
3wordchant/capsul-flask:tests2
3wordchant/capsul-flask:flask_debug
3wordchant/capsul-flask:publicapi
3wordchant/capsul-flask:webapi
3wordchant/capsul-flask:docker
3wordchant/capsul-flask:yc-templates
3wordchant/capsul-flask:docs-reshuffle
3wordchant/capsul-flask:mock-hub-create
3wordchant/capsul-flask:local-qemu
3wordchant/capsul-flask:publicapi-tests
3wordchant/capsul-flask:docker-api
mirsal/capsul-flask:ipv6
mirsal/capsul-flask:master
mirsal/capsul-flask:ssh-username
mirsal/capsul-flask:tests-with-logs
mirsal/capsul-flask:yolocolo
mirsal/capsul-flask:tests2
mirsal/capsul-flask:tests
mirsal/capsul-flask:flask_debug
mirsal/capsul-flask:publicapi
mirsal/capsul-flask:webapi
mirsal/capsul-flask:docker
mirsal/capsul-flask:yc-templates
mirsal/capsul-flask:docs-reshuffle
mirsal/capsul-flask:mock-hub-create
mirsal/capsul-flask:local-qemu
mirsal/capsul-flask:publicapi-tests
mirsal/capsul-flask:docker-api
..
compare: mirsal/capsul-flask:72c04d849522fe61cd625088275bf329354b737e
mirsal/capsul-flask:ipv6
mirsal/capsul-flask:master
mirsal/capsul-flask:ssh-username
mirsal/capsul-flask:tests-with-logs
mirsal/capsul-flask:yolocolo
mirsal/capsul-flask:tests2
mirsal/capsul-flask:tests
mirsal/capsul-flask:flask_debug
mirsal/capsul-flask:publicapi
mirsal/capsul-flask:webapi
mirsal/capsul-flask:docker
mirsal/capsul-flask:yc-templates
mirsal/capsul-flask:docs-reshuffle
mirsal/capsul-flask:mock-hub-create
mirsal/capsul-flask:local-qemu
mirsal/capsul-flask:publicapi-tests
mirsal/capsul-flask:docker-api
3wordchant/capsul-flask:master
3wordchant/capsul-flask:cyberia-prod
3wordchant/capsul-flask:tests
3wordchant/capsul-flask:yolocolo
3wordchant/capsul-flask:tests-with-logs
3wordchant/capsul-flask:tests2
3wordchant/capsul-flask:flask_debug
3wordchant/capsul-flask:publicapi
3wordchant/capsul-flask:webapi
3wordchant/capsul-flask:docker
3wordchant/capsul-flask:yc-templates
3wordchant/capsul-flask:docs-reshuffle
3wordchant/capsul-flask:mock-hub-create
3wordchant/capsul-flask:local-qemu
3wordchant/capsul-flask:publicapi-tests
3wordchant/capsul-flask:docker-api
1
Commits
docker
..
72c04d8495
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
72c04d8495 |
Docker image, & local development docker-compose.yml (#2)
continuous-integration/drone/push Build is passing
Adds: - a Docker image, which can be used in both development and production - a `docker-compose.yml` file for local development (could probably be adapted for production deployments) Testing: - `git checkout docker` - `docker-compose up` - pray 🙏 - go to http://localhost:5000 ## App architecture I added the ability to load secret config variables (`HUB_TOKEN`, `STRIPE_SECRET_KEY` etc) from files, to support [Docker Secrets](https://docs.docker.com/engine/swarm/secrets/) natively. The code should probably log an error if a specified `HUB_TOKEN_FILE` doesn't exist instead of failing silently.. ## Docker architecture This uses a multi-stage build to reduce the size of the final image -- having pipenv install to a predefined virtualenv, and then copying that over. The compose file doesn't include a definition for a cron runner service, and I haven't tested running one yet. Here be dragons! You can rebuild the image locally using `docker-compose build`, but this isn't required for changes to the app code, only if you edit the `Dockerfile`, or want to publish your image for use on a swarm server (in which case you will need to edit the image name to put in your own Docker hub credentials). Currently, the image is rebuilt (should set up auto-tagging..) and published with every push to this 3wordchant/capsul-flask fork. Reviewed-on: #2 Co-authored-by: 3wordchant <3wordchant@noreply.git.autonomic.zone> Co-committed-by: 3wordchant <3wordchant@noreply.git.autonomic.zone> |