Skip to content
Snippets Groups Projects
Commit 08e6c09f authored by Griefed's avatar Griefed :joystick:
Browse files

Cleanup and information additions

parent e0a4aec0
No related branches found
No related tags found
No related merge requests found
......@@ -33,24 +33,40 @@ proxy-arm | Use tag `proxy-arm` if accessing d-zone through a reverse proxy line
## Pre-built images
Using docker-compose:
```docker-compose.yml
version: '3.6'
version: "2"
services:
d-zone:
image: griefed/d-zone:latest
container_name: d-zone
image: griefed/d-zone
restart: unless-stopped
volumes:
- ./path/to/config:/config
environment:
- TOKEN=<YOUR_BOT_TOKEN_HERE>
- TZ=Europe/Berlin
- PUID=1000 # User ID
- PGID=1000 # Group ID
- TZ=Europe/Berlin # Timezone
- TOKEN=YOUR_DISCORD_BOT_TOKEN # Needed for D-Zone to create the simulation. See https://discordapp.com/developers/applications/me
- PUID=1000 # User ID
- PGID=1000 # Group ID
volumes:
- /host/path/to/config:/config # Contains all application data and base-image config files
ports:
- 3000:3000
- 3000:3000/tcp # Website
```
Using CLI:
```bash
docker create \
--name=d-zone \
-e TZ=Europe/Berlin \
-e TOKEN=YOUR_DISCORD_BOT_TOKEN \
-e PUID=1000 \
-e PGID=1000 \
-v /host/path/to/config:/config \
-p 3000:3000 \
--restart unless-stopped \
griefed/d-zone:latest
```
## Raspberry Pi
To run this container on a Raspberry Pi, use the `arm`-prefix for the `port`- and `proxy`-tags. I've tested the `port`-tag on a Raspberry Pi 3B.
......@@ -70,7 +86,55 @@ PUID | for UserID
PGID | for GroupID
ports | The port where d-zone will be available at. Only relevant when using `griefed/d-zone:port`
## Specify channels to ignore:
## User / Group Identifiers
When using volumes, permissions issues can arise between the host OS and the container. [Linuxserver.io](https://www.linuxserver.io/) avoids this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
```
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
```
# Building the image yourself
Use the [Dockerfile](https://github.com/Griefed/docker-D-Zone/Dockerfile) to build the image yourself, in case you want to make any changes to it
docker-compose.yml:
```docker-compose.yml
version: '3.6'
services:
d-zone:
build: ./docker-D-Zone/
container_name: d-zone
restart: unless-stopped
environment:
- TZ=Europe/Berlin # Timezone
- TOKEN=YOUR_DISCORD_BOT_TOKEN # Needed for D-Zone to create the simulation. See https://discordapp.com/developers/applications/me
- PUID=1000 # User ID
- PGID=1000 # Group ID
volumes:
- /host/path/to/config:/config # Contains all application data and base-image config files
ports:
- 3000:3000/tcp # Website
```
1. Clone the repository: `git clone https://github.com/Griefed/docker-D-Zone.git ./docker-D-Zone`
1. Rename **Dockerfile.port** to **Dockerfile**: `mv Dockerfile.port Dockerfile`
1. Prepare docker-compose.yml file as seen above
1. `docker-compose up -d --build d-zone`
1. Visit IP.ADDRESS.OF.HOST:8080
1. ???
1. Profit!
# App Information
**Specify channels to ignore:**
D-Zone will, by default, listen to all channels on the servers which your bot is connected to.
If you want to set ignoreChannels, you need to edit your `discord-config.json`file in the folder you specified in your `volumes:`.
Edit the "servers" block on a per server basis, e.g.:
......@@ -87,24 +151,24 @@ Edit the "servers" block on a per server basis, e.g.:
If you want to define multiple servers, see https://github.com/d-zone-org/d-zone/blob/master/discord-config-example.json
## Running D-Zone behind a reverse proxy like NGINX
**Running D-Zone behind a reverse proxy like NGINX**
If you want to serve d-zone with a reverse proxy like nginx and HTTPS, then this may be of help to you:
```docker-compose.yml
version: '3.6'
version: "2"
services:
d-zone:
image: griefed/d-zone:latest
container_name: d-zone
image: griefed/d-zone:proxy
restart: unless-stopped
volumes:
- ./path/to/config/files:/config
environment:
- TOKEN=<YOUR_BOT_TOKEN_HERE>
- TZ=Europe/Berlin
- PUID=1000 #User ID
- PGID=1000 #Group ID
- TZ=Europe/Berlin # Timezone
- TOKEN=YOUR_DISCORD_BOT_TOKEN # Needed for D-Zone to create the simulation. See https://discordapp.com/developers/applications/me
- PUID=1000 # User ID
- PGID=1000 # Group ID
volumes:
- /host/path/to/config:/config # Contains all application data and base-image config files
```
I use a dockerized NGINX as a reverse proxy, specifically [linuxserver/swag](https://hub.docker.com/r/linuxserver/swag).
......@@ -114,7 +178,7 @@ server {
listen 443 ssl;
listen [::]:443 ssl;
server_name SUBDMOAIN.*;
server_name SUBDOMAIN.*;
include /config/nginx/ssl.conf;
......@@ -141,60 +205,19 @@ server {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
proxy_set_header HOST ;
proxy_set_header X-Real-IP ;
proxy_set_header X-Forwarded-For ;
proxy_set_header X-Forwarded-Proto ;
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;
set d-zone;
set 3000;
set http;
proxy_pass ://:;
set $upstream_app d-zone;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#proxy_http_version 1.0;
#proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection "Upgrade";
}
}
```
## User / Group Identifiers
When using volumes, permissions issues can arise between the host OS and the container. [Linuxserver.io](https://www.linuxserver.io/) avoids this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
```
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
```
# Building the image yourself
Use the [Dockerfile](https://github.com/Griefed/docker-D-Zone/Dockerfile) to build the image yourself, in case you want to make any changes to it
docker-compose.yml:
```docker-compose.yml
version: '3.6'
services:
d-zone:
container_name: d-zone
build: ./docker-D-Zone/
restart: unless-stopped
volumes:
- ./path/to/config/files:/config
environment:
- TOKEN=<YOUR_BOT_TOKEN_HERE>
- TZ=Europe/Berlin
- PUID=1000 # User ID
- PGID=1000 # Group ID
ports:
- 3000:3000
```
1. Clone the repository: `git clone https://github.com/Griefed/docker-D-Zone.git ./docker-D-Zone`
1. Rename **Dockerfile.port** to **Dockerfile**: `mv Dockerfile.port Dockerfile`
1. Prepare docker-compose.yml file as seen above
1. `docker-compose up -d --build d-zone`
1. Visit IP.ADDRESS.OF.HOST:8080
1. ???
1. Profit!
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment