1
0
Fork 0

Added Dockerfile

merge-requests/1/head
Nuno Ferro 2019-02-12 16:01:47 +00:00
parent 9eefdc7aad
commit aa72772ccd
4 changed files with 44 additions and 0 deletions

View File

@ -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:
```

1
Source/.dockerignore Normal file
View File

@ -0,0 +1 @@
Dockerfile

17
Source/Dockerfile Normal file
View File

@ -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" ]

3
Source/run-node.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
node set httpport:$PORT password:$PASSWORD
node run-node.js