mirror of https://github.com/EdgeVPNio/tools.git
Modified dockerfile to make sure process does not exit, updated run with start script and updated README with steps to run
parent
54e5c3e301
commit
4c6ea69f2d
|
@ -8,6 +8,5 @@ RUN git clone https://github.com/EdgeVPNio/portal.git
|
||||||
WORKDIR "/portal"
|
WORKDIR "/portal"
|
||||||
RUN npm install --legacy-peer-deps
|
RUN npm install --legacy-peer-deps
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
EXPOSE 5000
|
|
||||||
COPY ./run.sh .
|
COPY ./run.sh .
|
||||||
CMD ./run.sh
|
CMD ./run.sh
|
|
@ -3,25 +3,32 @@
|
||||||
- Run the below command to start the mongo DB docker.
|
- Run the below command to start the mongo DB docker.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d -p 27017-27019:27017-27019 --network dkrnet --name mongodb mongo
|
docker run -d -p 27017-27019:27017-27019 --network evionet --rm --name mongodb mongo mongod --replSet Evio-rs0
|
||||||
```
|
```
|
||||||
|
|
||||||
- Create a directory inside the evio directory situated in the HOME directory.
|
- Run the below command from the host shell:
|
||||||
|
|
||||||
|
```
|
||||||
|
mongo Evio --eval "rs.initiate()"
|
||||||
|
```
|
||||||
|
|
||||||
|
- Create a directory on the host to be mounted in the container's filesystem, eg. ~/evio/portal
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir portal && cd portal
|
mkdir portal && cd portal
|
||||||
```
|
```
|
||||||
|
|
||||||
- Copy the .env file from [.env](https://github.com/EdgeVPNio/portal/blob/master/.env) into the portal directory.
|
- Copy the configuration file from [.env](https://github.com/EdgeVPNio/portal/blob/master/.env) into the portal directory.
|
||||||
|
|
||||||
- Replace the `DB_URI` with the name of the MongoDB container you gave in the first command.
|
- Replace the value of the key `DB_URI` with the name of the mongo container
|
||||||
|
|
||||||
```
|
```
|
||||||
DB_URI=<NAME OF Mongo Container>
|
DB_URI=mongodb
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run the below command to start the portal container
|
- Run the below command to start the portal container
|
||||||
|
The port number can be changed at your convenience.
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d -p 5000:5000 --name Evioportal -v $HOME/evio/portal/.env:/etc/evio/config/.env --privileged --network dkrnet edgevpnio/evio-portal:0.1
|
docker run -d -p 5000:5000 --name visualizer -v $HOME/evio/config/.env:/etc/evio/config/.env --rm --privileged --network evionet edgevpnio/evio-portal:0.1
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cp -r /etc/evio/config/.env .
|
cp -r /etc/evio/config/.env .
|
||||||
node server/Server.js
|
./startVisualizer.sh start
|
||||||
|
while :; do
|
||||||
|
sleep 300
|
||||||
|
done
|
Loading…
Reference in New Issue