File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM alpine:latest AS builder
2
+
3
+ ENV OWNER=rb-x
4
+ ENV REPO=penflow
5
+ ENV API_URL="https://api.github.com/repos/$OWNER/$REPO/releases/latest"
6
+
7
+ WORKDIR /root
8
+ RUN apk update && apk add --no-cache curl jq unzip
9
+ RUN LATEST_RELEASE=$(curl -s "$API_URL" | jq -r '.tag_name' ) && \
10
+ curl -LO "https://github.com/$OWNER/$REPO/releases/download/$LATEST_RELEASE/penflow-free-$LATEST_RELEASE.zip" && \
11
+ unzip -q "penflow-free-$LATEST_RELEASE.zip"
12
+
13
+ # serve site with nginx
14
+ FROM nginx:alpine
15
+
16
+ # copy files
17
+ WORKDIR /home/webserver
18
+ COPY ./nginx.conf /etc/nginx/
19
+ COPY --from=builder /root/dist /home/webserver/penflow
20
+
21
+ # expose and run
22
+ EXPOSE 80
Original file line number Diff line number Diff line change
1
+ events {}
2
+
3
+ http {
4
+ include mime.types ;
5
+ default_type application/octet-stream ;
6
+
7
+ server {
8
+ listen 80 ;
9
+ server_name localhost;
10
+
11
+ root /home/webserver/penflow/;
12
+
13
+ location / {
14
+ try_files $uri $uri / /index .html;
15
+ }
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments