better api image

master
Drew Bednar 3 years ago
parent 4a07b6efe7
commit b3b04a0af0

@ -1,8 +1,8 @@
REGISTRY_NAME=registry.runcible.io
FRONTEND_IMAGE_NAME=$(REGISTRY_NAME)/demo-helm-frontend
FRONTEND_IMAGE_VERSION=1.2.0
FRONTEND_IMAGE_VERSION=1.3.0
API_IMAGE_NAME=$(REGISTRY_NAME)/demo-helm-api
API_IMAGE_VERSION=1.2.0
API_IMAGE_VERSION=1.3.0
push-app-image: build-app-image
docker push $(FRONTEND_IMAGE_NAME):$(FRONTEND_IMAGE_VERSION)

@ -1,2 +1,5 @@
requirements.in
.env
tests/
Dockerfile
./api/.env

@ -18,8 +18,7 @@ COPY requirements.txt .
RUN pip install --no-cache -r requirements.txt
# Install app
COPY wsgi.py ./
COPY api/ ./api/
COPY . .
# Chown all the files to the app user
RUN chown -R app:app $APP_HOME
@ -27,6 +26,7 @@ RUN chown -R app:app $APP_HOME
# Change to the app user
USER app
ENTRYPOINT ["/usr/bin/tini", "--"]
ENTRYPOINT ["./entrypoint.sh"]
CMD ["gunicorn", "--log-level=debug", "-b", "0.0.0.0:5000", "wsgi:app"]
CMD ["gunicorn", "--worker-tmp-dir", "/dev/shm", "--workers=2", "--log-level=-", "--threads=4", \
"--worker-class", "gthread", "--bind", "0.0.0.0:5000", "wsgi:app"]

@ -3,10 +3,10 @@ image_pull_secret: regcred
services:
frontend:
image_name: "registry.runcible.io/demo-helm-frontend"
image_version: "1.2.0"
image_version: "1.3.0"
replicas: 1
backend:
image_name: "registry.runcible.io/demo-helm-api"
image_version: "1.2.0"
image_version: "1.3.0"
replicas: 1
random: "tis-random-default"
Loading…
Cancel
Save