Skip to content

Commit

Permalink
deploly: fix fly.io client routing notworking (#72)
Browse files Browse the repository at this point in the history
* ci: fix docker

* fix: docker error

* fix: docker

* fix: node version

* fix: linter

* fix

* fix lint

* update

* update

* refactor: move to new starter

* add vitest

* remove

* fix unit

* test

* fix style

* update

* remove unuse

* update

* update

* fix

* update

* update

* update

* fix e2e

* update

* fix

* fix

* fix

* fix

* update

* fix

* fix

* test

* test

* fix

* fix

* fix flyio client routing 404
  • Loading branch information
sky172839465 authored Nov 17, 2024
1 parent ab92d98 commit 3bbc893
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ FROM nginx:alpine

# Copy the build output to the Nginx html directory
COPY --from=0 /app/dist /usr/share/nginx/html

RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ kill_timeout = "5s"

[[services]]
protocol = "tcp"
internal_port = 80
internal_port = 8080
processes = ["app"]

[[services.ports]]
Expand Down
8 changes: 8 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server {
listen 8080;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"scripts": {
"start": "vite",
"build": "vite build",
"build": "vite build && cp dist/index.html dist/404.html",
"prepare": "husky",
"\n# OUTPUT CLEAN": "",
"clean:build": "rm -rf build",
Expand Down

0 comments on commit 3bbc893

Please sign in to comment.