From 806e31e508b3244ab3535b0a5d88040c979ce06e Mon Sep 17 00:00:00 2001 From: Pieter Jan Hummelen <132743080+phummelen@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:55:58 +0100 Subject: [PATCH] Added Grafana, Fixed GPS via EXIF extention (#33) * Status Jan 11th * Status Jan 12th, entrypoint is working * Rework after testing * added Grafana to docker-compose * Added Grafana, Fixed EXIF extention * Changes due to review --- deployment/nginx.conf | 21 +++++++++++++++++++++ deployment/web-dev.dockerfile | 3 ++- docker-compose.yml | 28 +++++++++++++++++++++------- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/deployment/nginx.conf b/deployment/nginx.conf index f9be56e3..b02a6aa3 100644 --- a/deployment/nginx.conf +++ b/deployment/nginx.conf @@ -31,6 +31,27 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + location /en/ { + proxy_pass http://docs/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + location /nl/ { + proxy_pass http://docs/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + location /grafana/ { + proxy_pass http://grafana:3000/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } location /phpmyadmin/ { proxy_pass http://phpmyadmin:80/; proxy_set_header Host $host; diff --git a/deployment/web-dev.dockerfile b/deployment/web-dev.dockerfile index af7d5c77..e30e7458 100644 --- a/deployment/web-dev.dockerfile +++ b/deployment/web-dev.dockerfile @@ -47,7 +47,8 @@ RUN set -eux; \ mysqli \ opcache \ pdo_mysql \ - zip + zip \ + exif # Get latest Composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/docker-compose.yml b/docker-compose.yml index dd4ca772..763ed372 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: uid: 1000 context: ./ dockerfile: deployment/web-dev.dockerfile - image: ${REGISTRY_USER}/${APP_NAME}-web:${APP_VERSION} + image: ${REGISTRY_USER}/${APP_NAME}/web:${APP_VERSION} container_name: ${APP_NAME}-web restart: unless-stopped environment: @@ -32,11 +32,11 @@ services: # build: # context: ./docs # dockerfile: deployment/docs.dockerfile - image: ${REGISTRY_USER}/${APP_NAME}-docs:${APP_VERSION} - container_name: ${APP_NAME}-docs - restart: unless-stopped - environment: - - ENVIRONMENT + image: ${REGISTRY_USER}/${APP_NAME}/docs:${APP_VERSION} + container_name: ${APP_NAME}-docs + restart: unless-stopped + environment: + - ENVIRONMENT db: image: mysql:8.0 container_name: ${APP_NAME}-db @@ -71,11 +71,25 @@ services: container_name: ${APP_NAME}-proxy restart: unless-stopped ports: - - "8080:80" + #- 8080:80 + - 80:80 + - 443:443 volumes: - ./deployment/nginx.conf:/etc/nginx/nginx.conf:ro + - ./cert:/etc/nginx/cert depends_on: - web + grafana: + image: grafana/grafana-oss + container_name: grafana + restart: unless-stopped + environment: + - GF_SERVER_ROOT_URL=http://localhost/grafana #future usage + - GF_INSTALL_PLUGINS=grafana-clock-panel + ports: + - 3000:3000 + volumes: + - ./data/grafana:/var/lib/grafana:rw networks: network: