Small change.
This commit is contained in:
parent
7cd0b9d956
commit
09f842f409
|
@ -58,11 +58,11 @@ The app will be deployed on port 3000.
|
||||||
To configure the app create a `.env` file (in the main folder), here are the available variables:
|
To configure the app create a `.env` file (in the main folder), here are the available variables:
|
||||||
```
|
```
|
||||||
CLIENT_PORT=2500 # Default: 3000
|
CLIENT_PORT=2500 # Default: 3000
|
||||||
API_PORT=5500 # Default: 5000
|
API_PORT=5700 # Default: 5500
|
||||||
API_ADDRESS=192.168.1.14 # Default: localhost*
|
API_ADDRESS=192.168.1.14 # Default: localhost
|
||||||
```
|
```
|
||||||
|
|
||||||
> *If you want to use this app across the network set `API_ADDRESS` as the computer (where LinkWarden is hosted) IP address.
|
> If you want to use this app across the network set `API_ADDRESS` as the computer (where LinkWarden is hosted) IP address.
|
||||||
|
|
||||||
### Manual Setup
|
### Manual Setup
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,5 @@ RUN chown -R node:node /home/node /media
|
||||||
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5500
|
||||||
CMD node server.js
|
CMD node server.js
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports.port = process.env.PORT || 5000;
|
module.exports.port = process.env.PORT || 5500;
|
||||||
module.exports.URI = process.env.MONGODB_URI || "mongodb://localhost:27017"; // URI
|
module.exports.URI = process.env.MONGODB_URI || "mongodb://localhost:27017"; // URI
|
||||||
module.exports.database = process.env.DB_NAME || "sample_db"; // Database name
|
module.exports.database = process.env.DB_NAME || "sample_db"; // Database name
|
||||||
module.exports.collection = process.env.COLLECTION_NAME || "list"; // Collection name
|
module.exports.collection = process.env.COLLECTION_NAME || "list"; // Collection name
|
||||||
|
|
|
@ -19,7 +19,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./api:/home/node
|
- ./api:/home/node
|
||||||
ports:
|
ports:
|
||||||
- ${API_PORT:-5000}:5000
|
- ${API_PORT:-5500}:5500
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
# - DANGEROUSLY_DISABLE_HOST_CHECK=true
|
# - DANGEROUSLY_DISABLE_HOST_CHECK=true
|
||||||
- REACT_APP_API_HOST=http://${API_ADDRESS:-localhost}:${API_PORT:-5000}
|
- REACT_APP_API_HOST=http://${API_ADDRESS:-localhost}:${API_PORT:-5500}
|
||||||
command: npm run go
|
command: npm run go
|
||||||
volumes:
|
volumes:
|
||||||
- /home/node/node_modules
|
- /home/node/node_modules
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
export const API_HOST = process.env.REACT_APP_API_HOST || "http://localhost:5000"; // API full address
|
export const API_HOST = process.env.REACT_APP_API_HOST || "http://localhost:5500"; // API full address
|
||||||
|
|
Ŝarĝante…
Reference in New Issue