Removed proxy Dockerfile, updated docker-compose.yml
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Administrator 2023-03-20 23:26:53 +01:00
parent dfb254d413
commit df6f17ed76
4 changed files with 34 additions and 63 deletions

View File

@ -45,22 +45,4 @@ pipeline:
path: "frontend/**" path: "frontend/**"
event: push event: push
# -------------------------------------- Frontend --------------------------------------
build_proxy:
image: woodpeckerci/plugin-docker-buildx
settings:
repo:
from_secret: repository_proxy
username:
from_secret: registry_username
password:
from_secret: registry_password
registry:
from_secret: registry
dockerfile: Dockerfile.Proxy
platforms: linux/amd64
when:
path: "proxy/**"
event: push
branches: main branches: main

View File

@ -1,2 +0,0 @@
FROM jonasal/nginx-certbot:latest
COPY proxy/* /etc/nginx/conf.d/

View File

@ -5,15 +5,13 @@ services:
image: jonasal/nginx-certbot:latest image: jonasal/nginx-certbot:latest
restart: unless-stopped restart: unless-stopped
environment: environment:
- CERTBOT_EMAIL - CERTBOT_EMAIL=${CERTBOT_EMAIL}
env_file:
- ./nginx-certbot.env
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
volumes: volumes:
- nginx_secrets:/etc/letsencrypt - nginx_secrets:/etc/letsencrypt
- ./user_conf.d:/etc/nginx/user_conf.d - ./proxy:/etc/nginx/user_conf.d
frontend: frontend:
image: registry.flokaiser.com/dhbw/cloud-computing-frontend:latest image: registry.flokaiser.com/dhbw/cloud-computing-frontend:latest
@ -22,7 +20,7 @@ services:
backend: backend:
image: registry.flokaiser.com/dhbw/cloud-computing-backend:latest image: registry.flokaiser.com/dhbw/cloud-computing-backend:latest
restart: unless-stopped restart: unless-stopped
env_file: environment:
- DATABASE_URL=${DATABASE_URL} - DATABASE_URL=${DATABASE_URL}
- AZURE_KEY=${AZURE_KEY} - AZURE_KEY=${AZURE_KEY}
- AZURE_ENDPOINT=${AZURE_ENDPOINT} - AZURE_ENDPOINT=${AZURE_ENDPOINT}

View File

@ -1,17 +1,11 @@
worker_processes 1; # HTTPS server configuration
server {
events {
worker_connections 1024;
}
http {
# HTTPS server configuration
server {
listen 443 ssl; listen 443 ssl;
server_name translator.dhbw.flokaiser.com; server_name translator.dhbw.flokaiser.com;
ssl_certificate /etc/nginx/certs/cert.pem; ssl_certificate /etc/letsencrypt/live/test-name/fullchain.pem;
ssl_certificate_key /etc/nginx/certs/key.pem; ssl_certificate_key /etc/letsencrypt/live/test-name/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/test-name/chain.pem;
location / { location / {
# Forward requests to port 80 # Forward requests to port 80
@ -30,13 +24,12 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
} }
} }
# HTTP server configuration # HTTP server configuration
server { server {
listen 80; listen 80;
server_name translator.dhbw.flokaiser.com; server_name translator.dhbw.flokaiser.com;
return 301 https://$server_name$request_uri; return 301 https://$server_name$request_uri;
}
} }