From deab0e89eb57cb97868045749662e3ac28cad2b7 Mon Sep 17 00:00:00 2001 From: CodeServer Date: Fri, 1 Apr 2022 12:01:06 +0100 Subject: [PATCH] fixed but with start-prod --- README.md | 4 ++-- docker/docker-compose.yml | 2 +- webpack.config.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a74e008..bd4a1a2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ 4. cd into the direct where you store the "docker-compose.yml" file. 5. * run `docker-compose up -d` to start the service. * run `docker-compose down` to stop the service -6. You can access it on port 8080 by default. To change the port number, edit docker-compose.yml. Under ports, replace `8080:8080` with `:8080`. Then stop the service and start it again. +6. You can access it on port 3000 by default. To change the port number, edit docker-compose.yml. Under ports, replace `3000:3000` with `:3000`. Then stop the service and start it again. 7. Node: you may exprience issues running the container on machines with limited ram. * If you are running this container on a server with 2-3 GiB of ram, you need to uncomment the two "environment" lines that sets "--max-old-space-size=1536" to allow node to allocate up to 1.5 GiB of ram. Also make sure there are no other programs on your system that requires lots of ram. \ You should not run this container on machines with less than 2 GiB of ram @@ -37,7 +37,7 @@ Follow the instructions bellow. 3. If you are installing it on a linux machine with `screen` installed, run `screen -S ` to create a new screen. where `` can be any name you choose. 4. run `npm run start-prod` 5. if you followed step 3, press `CTRL ^A` then press `D` while holding `CTRL ^A`. The screen will detach. -6. You can then access it on port 8080 +6. You can then access it on port 3000 ## Setup Reverse Proxy You can use Apache, Ngnix or other tools to set up a reverse proxy and connect it to a hostname. [here](https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html) is a guide on apache reverse proxy setup. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 8ba4be0..5e71066 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,5 +6,5 @@ services: # environment: # - NODE_OPTIONS="--max-old-space-size=1536" ports: - - 8080:8080 + - 3000:3000 restart: unless-stopped \ No newline at end of file diff --git a/webpack.config.ts b/webpack.config.ts index 6702aad..a9b32ae 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -138,6 +138,7 @@ switch (BUILD_ENV) { ); baseConfig.mode = "production"; + if (SERVE_LOCAL) baseConfig.devServer = getDevServerConfig(); break; }