Skip to content

Commit

Permalink
fixed few errors that caused the thing not to build properly for prod…
Browse files Browse the repository at this point in the history
…uction
  • Loading branch information
trsctr committed Jul 26, 2024
1 parent d752cc4 commit 0c1c0a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ COPY --chown=www:www ./Frontend/package.json /app/package.json
COPY --chown=www:www ./Frontend/package-lock.json /app/package-lock.json
COPY --chown=www:www ./Frontend/vite.config.js /app/vite.config.js
COPY --chown=www:www ./Frontend/src /app/src
COPY --chown=www:www ./Frontend/src /www/
COPY --chown=www:www ./Frontend/default.jpg /www/avatars/
COPY --chown=www:www ./Frontend/tools.sh /app/tools.sh

# Install npm dependencies
Expand Down
5 changes: 2 additions & 3 deletions Frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ http {
server {
listen 443 ssl;
server_name localhost;

ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;
ssl_protocols TLSv1.2 TLSv1.3;
Expand All @@ -58,7 +57,7 @@ http {
location = /50x.html {
root /var/lib/nginx/html;
}

# Serve static files
location / {
try_files $uri $uri/ /index.html;
Expand Down Expand Up @@ -107,7 +106,7 @@ http {
}

# Proxy WebSocket and HTTP requests to the game server
location /game-server/ {
location /socket.io/ {
proxy_pass http://game-server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
1 change: 1 addition & 0 deletions Frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default defineConfig(({ mode }) => ({
build: {
outDir: '../dist', // Output directory for production build
sourcemap: mode === 'development', // Enable source maps in development mode
// minify: 'esbuild', // Minify using esbuild in production mode
},
server: {
port: 3000, // Port for Vite development server
Expand Down

0 comments on commit 0c1c0a4

Please sign in to comment.