Skip to content

Commit 8df83d4

Browse files
committedMar 13, 2025
chore: update devbox ci config
1 parent ff0bbc9 commit 8df83d4

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
 

‎.github/workflows/update-devbox.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ jobs:
6363
context: .
6464
push: true
6565
tags: beclab/devbox:${{ steps.get-latest-tag.outputs.tag }}
66-
file: Dockerfile
66+
file: apps/Dockerfile-devbox-client
6767
platforms: linux/amd64,linux/arm64

‎Dockerfile-devbox-client

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM nginx:stable-alpine
2+
3+
COPY apps/devbox/dist/spa /app
4+
5+
RUN apk --no-cache add nginx
6+
7+
RUN echo ' \
8+
server { \
9+
listen 80 default_server; \
10+
root /app; \
11+
\
12+
location / { \
13+
add_header Cache-Control "no-store"; \
14+
try_files $uri $uri/index.html /index.html; \
15+
} \
16+
\
17+
location /api/ { \
18+
proxy_pass http://devbox-server:8080; \
19+
proxy_set_header Host $http_host; \
20+
proxy_set_header X-real-ip $remote_addr; \
21+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \
22+
proxy_http_version 1.1; \
23+
proxy_set_header Upgrade $http_upgrade; \
24+
proxy_set_header Connection $http_connection; \
25+
proxy_set_header Accept-Encoding gzip; \
26+
proxy_read_timeout 180; \
27+
} \
28+
\
29+
}' > /etc/nginx/conf.d/default.conf
30+
31+
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
32+
33+
EXPOSE 80
34+
35+
CMD [ "nginx", "-g", "daemon off;" ]

0 commit comments

Comments
 (0)
Please sign in to comment.