fixed but with start-prod
This commit is contained in:
parent
d6df4b48bd
commit
deab0e89eb
@ -22,7 +22,7 @@
|
|||||||
4. cd into the direct where you store the "docker-compose.yml" file.
|
4. cd into the direct where you store the "docker-compose.yml" file.
|
||||||
5. * run `docker-compose up -d` to start the service.
|
5. * run `docker-compose up -d` to start the service.
|
||||||
* run `docker-compose down` to stop 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 `<the port number you want>: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 `<the port number you want>:3000`. Then stop the service and start it again.
|
||||||
7. Node: you may exprience issues running the container on machines with limited ram.
|
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. \
|
* 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
|
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 <name>` to create a new screen. where `<name>` can be any name you choose.
|
3. If you are installing it on a linux machine with `screen` installed, run `screen -S <name>` to create a new screen. where `<name>` can be any name you choose.
|
||||||
4. run `npm run start-prod`
|
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.
|
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
|
## 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.
|
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.
|
||||||
|
|||||||
@ -6,5 +6,5 @@ services:
|
|||||||
# environment:
|
# environment:
|
||||||
# - NODE_OPTIONS="--max-old-space-size=1536"
|
# - NODE_OPTIONS="--max-old-space-size=1536"
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 3000:3000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@ -138,6 +138,7 @@ switch (BUILD_ENV) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
baseConfig.mode = "production";
|
baseConfig.mode = "production";
|
||||||
|
if (SERVE_LOCAL) baseConfig.devServer = getDevServerConfig();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user