From 6e3428c1f33d72f200409302fd3099c6a8b4ef91 Mon Sep 17 00:00:00 2001 From: Richard Toth Date: Sat, 28 Feb 2026 12:58:47 +0100 Subject: [PATCH] init commit --- .env.dist | 3 +++ .gitignore | 1 + docker-compose.yml | 48 ++++++++++++++++++++++++++++++++++++ nginx-api/Dockerfile | 5 ++++ nginx-api/peppermintapi.conf | 17 +++++++++++++ nginx/Dockerfile | 5 ++++ nginx/peppermint.conf | 17 +++++++++++++ 7 files changed, 96 insertions(+) create mode 100644 .env.dist create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 nginx-api/Dockerfile create mode 100644 nginx-api/peppermintapi.conf create mode 100644 nginx/Dockerfile create mode 100644 nginx/peppermint.conf diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..d80acfd --- /dev/null +++ b/.env.dist @@ -0,0 +1,3 @@ +HOST= +LETSENCRYPT_EMAIL= +HOST_API= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..14d6e77 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,48 @@ +services: + peppermint: + container_name: peppermint + image: pepperlabs/peppermint:latest + ports: + - 3000:3000 + - 5003:5003 + restart: always + depends_on: + - peppermint_postgres + networks: + - web + environment: + DB_USERNAME: "peppermint" + DB_PASSWORD: "T297rT123we6" + DB_HOST: "postgres" + SECRET: 'T297rT123we6' + + peppermint-nginx: + build: ./nginx + container_name: peppermint-nginx + environment: + - VIRTUAL_HOST=${HOST} + - LETSENCRYPT_HOST=${HOST} + - LETSENCRYPT_EMAIL=${EMAIL} + networks: + - web + depends_on: + - peppermint + restart: ${RESTART} + + peppermint-api-nginx: + build: ./nginx-api + container_name: peppermint-api-nginx + environment: + - VIRTUAL_HOST=${HOST_API} + - LETSENCRYPT_HOST=${HOST_API} + - LETSENCRYPT_EMAIL=${EMAIL} + networks: + - web + depends_on: + - peppermint + restart: ${RESTART} + + +networks: + web: + external: true diff --git a/nginx-api/Dockerfile b/nginx-api/Dockerfile new file mode 100644 index 0000000..19406ea --- /dev/null +++ b/nginx-api/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.29-alpine + +LABEL author="TR Web " + +COPY peppermintapi.conf /etc/nginx/conf.d/default.conf diff --git a/nginx-api/peppermintapi.conf b/nginx-api/peppermintapi.conf new file mode 100644 index 0000000..384f4d8 --- /dev/null +++ b/nginx-api/peppermintapi.conf @@ -0,0 +1,17 @@ +server { + listen 80; + listen [::]:80; + add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; + + location / { + proxy_pass http://peppermint:5003; + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_redirect off; + proxy_read_timeout 5m; + } + client_max_body_size 10M; +} diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..d3cc216 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.29-alpine + +LABEL author="TR Web " + +COPY peppermint.conf /etc/nginx/conf.d/default.conf diff --git a/nginx/peppermint.conf b/nginx/peppermint.conf new file mode 100644 index 0000000..25db109 --- /dev/null +++ b/nginx/peppermint.conf @@ -0,0 +1,17 @@ +server { + listen 80; + listen [::]:80; + add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; + + location / { + proxy_pass http://peppermint:3000; + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_redirect off; + proxy_read_timeout 5m; + } + client_max_body_size 10M; +}