build and run stuff

This commit is contained in:
Wolfgang Hottgenroth 2021-01-18 10:14:54 +01:00
parent 876c99d790
commit 8a0840dd70
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
5 changed files with 34 additions and 1 deletions

View File

@ -1,6 +1,7 @@
FROM python:latest
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
LABEL ImageName="registry.hottis.de/hv/hv-service"
ARG APP_DIR="/opt/app"
ARG CONF_DIR="${APP_DIR}/config"

7
ENV.tmpl Normal file
View File

@ -0,0 +1,7 @@
# copy to ENV and adjust values
export DB_HOST="172.16.10.18"
export DB_USER="hausverwaltung-ui"
export DB_PASS="test123"
export DB_NAME="hausverwaltung"

8
build.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
IMAGE_NAME="registry.hottis.de/hv/hv-service"
VERSION=0.0.1
docker build -t ${IMAGE_NAME}:${VERSION} .
docker push ${IMAGE_NAME}:${VERSION}

18
run.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
. ENV
IMAGE_NAME="registry.hottis.de/hv/hv-service"
VERSION=0.0.1
docker run \
-d \
--rm \
--name "hv-service" \
-p 5000:5000 \
-e DB_HOST=$DB_HOST \
-e DB_USER=$DB_USER \
-e DB_PASS=$DB_PASS \
-e DB_NAME=$DB_NAME
${IMAGE_NAME}:${VERSION}

View File

@ -2,6 +2,5 @@
http = :5000
wsgi-file = server.py
processes = 4
threads = 2
stats = :9191