Docker photovoter deploy scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
w2 e19e2de1a3
fix: photo path
4 years ago
Dockerfile.photovoter-backend fix: photo path 4 years ago
Dockerfile.photovoter-frontend add: frontend docker deploy scripts 4 years ago
Dockerfile.pythonmagick add: docker deploy scripts 4 years ago
LICENSE Initial commit 4 years ago
README.md add: frontend readme 4 years ago
docker-compose.yml add: frontend docker deploy scripts 4 years ago

README.md

photovoter_deploy

Docker photovoter deploy scripts
(example values given in cursive)

Build

Python + ImageMagick base container

docker build --tag pythonmagick - < Dockerfile.pythonmagick

Photovoter backend + dependencies + random credentials

docker build --tag photovoter-backend \
--build-arg=USERNAME=(tr --delete --complement "[:alnum:]" </dev/random | head --bytes=5) \
--build-arg=USERPASS=(tr --delete --complement "[:alnum:]" </dev/random | head --bytes=56) \
- < Dockerfile.photovoter-backend

Photovoter frontend


docker build --tag photovoter-frontend \
--build-arg=DOMAIN=gman.me \
- < Dockerfile.photovoter-frontend

Run

mkdir --parents photovoter_data/{original,image}
docker volume create --name=caddy_data
docker-compose --file docker-compose.yml up

Deployment status

API docs are available at

http://gman.me/api/v1/docs

Current credentials

From active deployment

docker exec photovoter_backend_1 grep 'CRED_' /opt/photovoter_backend/config.py

From inactive deployment

docker run --rm photovoter-backend:latest grep 'CRED_' /opt/photovoter_backend/config.py