Skip to content

Commit 55e7e29

Browse files
committed
chore(web): The backend for the web (/) has been removed and the page goes through nginx
1 parent d72269b commit 55e7e29

File tree

8 files changed

+12
-1282
lines changed

8 files changed

+12
-1282
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
outputs:
2121
server: ${{ steps.filter.outputs.server }}
2222
chart: ${{ steps.filter.outputs.chart }}
23-
web: ${{ steps.filter.outputs.web }}
2423
parser: ${{ steps.filter.outputs.parser }}
2524
steps:
2625
- uses: actions/checkout@v4
@@ -32,8 +31,6 @@ jobs:
3231
- 'server/**'
3332
chart:
3433
- 'chart/**'
35-
web:
36-
- 'web/**'
3734
parser:
3835
- 'parser/**'
3936
@@ -97,36 +94,6 @@ jobs:
9794
labels: ${{ steps.meta.outputs.labels }}
9895
platforms: linux/amd64,linux/arm64
9996

100-
build-web:
101-
name: Build web
102-
needs: detect-changes
103-
if: needs.detect-changes.outputs.web == 'true'
104-
runs-on: ubuntu-latest
105-
steps:
106-
- uses: actions/checkout@v4
107-
- uses: docker/setup-buildx-action@v3
108-
- uses: docker/login-action@v3
109-
with:
110-
registry: ${{ env.REGISTRY }}
111-
username: ${{ github.actor }}
112-
password: ${{ secrets.GITHUB_TOKEN }}
113-
- id: meta
114-
uses: docker/metadata-action@v5
115-
with:
116-
images: ${{ env.IMAGE_PREFIX }}-web
117-
tags: |
118-
type=raw,value=latest
119-
type=ref,event=branch
120-
type=sha
121-
- uses: docker/build-push-action@v5
122-
with:
123-
file: ./web/Dockerfile
124-
context: .
125-
push: true
126-
tags: ${{ steps.meta.outputs.tags }}
127-
labels: ${{ steps.meta.outputs.labels }}
128-
platforms: linux/amd64,linux/arm64
129-
13097
build-parser:
13198
name: Build parser
13299
needs: detect-changes

docker-compose.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ services:
99
- ./CertSSL:/etc/nginx/ssl
1010
- ./assets/logo.png:/etc/nginx/assets/logo.png
1111
- ./docs/dist:/etc/nginx/dist
12+
- ./web:/etc/nginx/static/
1213
depends_on:
1314
- server
1415
- chart
15-
- web
1616
- docs
1717

1818
server:
@@ -50,16 +50,6 @@ services:
5050
depends_on:
5151
- postgres
5252

53-
web:
54-
build:
55-
context: .
56-
dockerfile: web/Dockerfile
57-
restart: unless-stopped
58-
ports:
59-
- '3050:3050'
60-
volumes:
61-
- './config.hjson:/config.hjson'
62-
6353
docs:
6454
build:
6555
context: ./docs

nginx/web/nginx.conf

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
root /etc/nginx/static/src/html;
2+
index index.html;
3+
14
location / {
2-
proxy_pass http://web:3050;
3-
proxy_set_header Host $host;
4-
proxy_set_header X-Real-IP $remote_addr;
5-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6-
proxy_set_header X-Forwarded-Proto $scheme;
5+
try_files $uri $uri/ /index.html;
6+
}
7+
8+
location /static/ {
9+
alias /etc/nginx/static/src/static/;
10+
try_files $uri =404;
711
}
812

913
location /robots.txt {
1014
alias robots.txt;
1115
}
1216

1317
location /favicon.ico {
14-
alias assets/logo.png;
15-
}
18+
alias /etc/nginx/assets/logo.png;
19+
}

web/Dockerfile

Lines changed: 0 additions & 31 deletions
This file was deleted.

web/main.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)