Removed proxy Dockerfile, updated docker-compose.yml
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
dfb254d413
commit
df6f17ed76
@ -45,22 +45,4 @@ pipeline:
|
||||
path: "frontend/**"
|
||||
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
|
||||
|
@ -1,2 +0,0 @@
|
||||
FROM jonasal/nginx-certbot:latest
|
||||
COPY proxy/* /etc/nginx/conf.d/
|
@ -5,15 +5,13 @@ services:
|
||||
image: jonasal/nginx-certbot:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CERTBOT_EMAIL
|
||||
env_file:
|
||||
- ./nginx-certbot.env
|
||||
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- nginx_secrets:/etc/letsencrypt
|
||||
- ./user_conf.d:/etc/nginx/user_conf.d
|
||||
- ./proxy:/etc/nginx/user_conf.d
|
||||
|
||||
frontend:
|
||||
image: registry.flokaiser.com/dhbw/cloud-computing-frontend:latest
|
||||
@ -22,7 +20,7 @@ services:
|
||||
backend:
|
||||
image: registry.flokaiser.com/dhbw/cloud-computing-backend:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
environment:
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- AZURE_KEY=${AZURE_KEY}
|
||||
- AZURE_ENDPOINT=${AZURE_ENDPOINT}
|
||||
|
@ -1,42 +1,35 @@
|
||||
worker_processes 1;
|
||||
# HTTPS server configuration
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name translator.dhbw.flokaiser.com;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
ssl_certificate /etc/letsencrypt/live/test-name/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/test-name/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/test-name/chain.pem;
|
||||
|
||||
location / {
|
||||
# Forward requests to port 80
|
||||
proxy_pass http://frontend:80/;
|
||||
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 https;
|
||||
}
|
||||
|
||||
location /api {
|
||||
# Forward requests to port 80
|
||||
proxy_pass http://backend:8080/;
|
||||
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 https;
|
||||
}
|
||||
}
|
||||
|
||||
http {
|
||||
# HTTPS server configuration
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name translator.dhbw.flokaiser.com;
|
||||
# HTTP server configuration
|
||||
server {
|
||||
listen 80;
|
||||
server_name translator.dhbw.flokaiser.com;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/cert.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/key.pem;
|
||||
|
||||
location / {
|
||||
# Forward requests to port 80
|
||||
proxy_pass http://frontend:80/;
|
||||
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 https;
|
||||
}
|
||||
|
||||
location /api {
|
||||
# Forward requests to port 80
|
||||
proxy_pass http://backend:8080/;
|
||||
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 https;
|
||||
}
|
||||
}
|
||||
|
||||
# HTTP server configuration
|
||||
server {
|
||||
listen 80;
|
||||
server_name translator.dhbw.flokaiser.com;
|
||||
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
}
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user