Skip to content

Commit

Permalink
♻️ fix: ルーティング設定をルートパスに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
Suke-H committed Nov 4, 2024
1 parent a4f1af3 commit 99b3825
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*

# ビルドされたファイルをコピー
COPY --from=builder /app/dist /usr/share/nginx/html/game_pages
COPY --from=builder /app/dist /usr/share/nginx/html

# Nginx設定ファイルをコピー
COPY default.conf /etc/nginx/conf.d/default.conf
Expand Down
8 changes: 4 additions & 4 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ server {
listen 8080;
server_name localhost;

location /game_pages/ {
alias /usr/share/nginx/html/game_pages/;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /game_pages/index.html;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
Expand All @@ -14,7 +14,7 @@ server {
}

types {
text/html html htm shtml; # HTMLファイルのMIMEタイプを追加
text/html html htm shtml;
application/javascript js;
text/css css;
}
Expand Down
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: '/game_pages/',
plugins: [react()],
})

0 comments on commit 99b3825

Please sign in to comment.