build and run stuff
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
FROM python:latest
|
FROM python:latest
|
||||||
|
|
||||||
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
|
LABEL Maintainer="Wolfgang Hottgenroth wolfgang.hottgenroth@icloud.com"
|
||||||
|
LABEL ImageName="registry.hottis.de/hv/hv-service"
|
||||||
|
|
||||||
ARG APP_DIR="/opt/app"
|
ARG APP_DIR="/opt/app"
|
||||||
ARG CONF_DIR="${APP_DIR}/config"
|
ARG CONF_DIR="${APP_DIR}/config"
|
||||||
|
7
ENV.tmpl
Normal file
7
ENV.tmpl
Normal 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
8
build.sh
Executable 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
18
run.sh
Executable 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}
|
@ -2,6 +2,5 @@
|
|||||||
http = :5000
|
http = :5000
|
||||||
wsgi-file = server.py
|
wsgi-file = server.py
|
||||||
processes = 4
|
processes = 4
|
||||||
threads = 2
|
|
||||||
stats = :9191
|
stats = :9191
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user