File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ RUN apk add --no-cache git && npm install -g pnpm && pnpm install
10
10
COPY views/ .
11
11
RUN pnpm build
12
12
FROM ubuntu:22.04
13
- RUN apt-get update && apt-get install -y git
13
+ RUN apt-get update && apt-get install -y git nginx
14
14
COPY --from=backend-builder /app/target/release/jzfs /explore/
15
15
RUN chmod +x /explore/jzfs
16
16
COPY --from=frontend-builder /app/views/dist /explore/html
17
+ COPY script/nginx.conf /etc/nginx/nginx.conf
17
18
EXPOSE 80
18
- ENV PORT=80
19
- CMD ["sh" , "-c" , "/explore/jzfs" ]
19
+ COPY script/start.sh /explore/start.sh
20
+ RUN chmod +x /explore/start.sh
21
+ ENTRYPOINT ["sh" , "-c" , "/explore.sh" ]
Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ impl ApiService {
70
70
71
71
)
72
72
. configure ( shell:: http:: git_route)
73
- . route ( "{tail:.*}" , get ( ) . to ( dist:: dist) )
73
+ // .route("{tail:.*}",get().to(dist::dist))
74
74
;
75
75
}
76
76
}
77
77
mod auth;
78
78
mod repo;
79
79
mod error;
80
- mod dist;
80
+ // mod dist;
Original file line number Diff line number Diff line change 1
1
server {
2
2
listen 80 ;
3
- root /usr/share/nginx/ html;
3
+ root /explore/ html;
4
4
index index.html;
5
5
location /api/ {
6
6
proxy_pass http://localhost:8080;
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ function start_jzfs_git() {
4
+ echo " Starting jzfs_git..."
5
+ sh -c /explore/jzfs & > /dev/null 2>&1
6
+ }
7
+
8
+ function start_nginx() {
9
+ echo " Starting nginx..."
10
+ nginx -g " daemon off;"
11
+ }
12
+
13
+ start_jzfs_git ();
14
+ start_nginx ();
You can’t perform that action at this time.
0 commit comments