Added Dockerfile
parent
9eefdc7aad
commit
aa72772ccd
23
README.md
23
README.md
|
@ -131,6 +131,29 @@ git reset --hard
|
|||
git pull
|
||||
```
|
||||
|
||||
## Installation in Docker
|
||||
This Docker image expects the environment variables `PORT` and `PASSWORD` to define on which port the GUI listens and what password should be used to authenticate. By default port is `8080` and password is `changeme`.
|
||||
|
||||
Build image:
|
||||
```
|
||||
docker build -t tera Source
|
||||
```
|
||||
|
||||
Run interactively (forwarding ports):
|
||||
```
|
||||
docker run -it -p 8080:8080 -p 30000:30000 \
|
||||
-v $(pwd)/DATA:/DATA \
|
||||
--name tera tera
|
||||
```
|
||||
|
||||
Run on the background (using the host network):
|
||||
```
|
||||
docker run -d --restart unless-stopped --net=host \
|
||||
-v $(pwd)/DATA:/DATA \
|
||||
-e PASSWORD=another_password \
|
||||
--name tera tera
|
||||
```
|
||||
|
||||
## MAIN NETWORK
|
||||
Default values:
|
||||
```
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Dockerfile
|
|
@ -0,0 +1,17 @@
|
|||
FROM node:slim
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get dist-upgrade -y
|
||||
RUN apt-get install -y python build-essential
|
||||
|
||||
COPY . /tera
|
||||
|
||||
WORKDIR /tera
|
||||
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 8080
|
||||
ENV PORT=8080
|
||||
ENV PASSWORD=changeme
|
||||
|
||||
CMD [ "/tera/run-node.sh" ]
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
node set httpport:$PORT password:$PASSWORD
|
||||
node run-node.js
|
Loading…
Reference in New Issue