Skip to content
Snippets Groups Projects
Unverified Commit dca00342 authored by Griefed's avatar Griefed :joystick: Committed by GitHub
Browse files

Delete .gitlab directory

parent 88ead585
No related tags found
No related merge requests found
export GITHUB_REPONAME='docker-D-Zone'
export GITHUB_USERNAME='Griefed'
export GITHUB_REPONAME_HEADER='https://i.griefed.de/images/2020/11/18/docker-D-Zone_header.png'
export GITHUB_REPONAME_SCREENSHOT='https://i.griefed.de/images/2020/11/18/docker-D-Zone_screenshot.png'
export DOCKERHUB_REPONAME='d-zone'
export DOCKERHUB_TAG_ONE='port'
export DOCKERHUB_TAG_TWO='proxy'
export DOCKERHUB_USERNAME='griefed'
export DESCRIPTION='D-Zone is a graphical simulation meant to abstractly represent the activity in your Discord server. This is not meant for any actual monitoring or diagnostics, only an experiment in the abstraction of chatroom data represented via autonomous characters in a scene.'
export CREATOR_USERNAME='d-zone-org'
export CREATOR_REPONAME='d-zone'
export EXAMPLE_SITE_LINK='https://pixelatomy.com/dzone/?s=default'
export CONTAINER_PORT='3000'
export BASE_IMAGE='lsiobase/alpine'
\ No newline at end of file
[![$GITHUB_REPONAME]($GITHUB_REPONAME_HEADER)](https://github.com/$GITHUB_USERNAME/$GITHUB_REPONAME)
[![Homepage](https://img.shields.io/badge/Griefed.de-Homepage-c0ffee?style=for-the-badge&labelColor=325358&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAACylBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7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VyA6Yh0w5VfOWl2sNhFY9DZglkRIZ9kAnh0ip4RF8gonioSgc9hKpggADVo24foMhuQxRiheJxdWkrrywmohS7gds9zN8oAhD5r4WvEsnn3tvPJcofyxBbg7bDU5wHfLr2EcgO7NnUp7KeuOq+TTr2TxCB+/G6gFUjmAsBeUNKIQTSz9wvAGm1KeDE2vHSKqyHih/5GqqPnZ/nqi6mAUfc6BdN3gKXqgSMH9DNTETBO1RrqoZrDxdzpKpyGciuTXbGWYGDocv7xWcQUS40fQRompOi0gHg2wCyxy0EkBXhP/cWEeVD0w/ftSIbHVXeBwjRjMrQrxOBq9OMV3SOAzwmJPifBwR1OHbc1wJIH5q2sWvFcofQwivyCX/3NSAu0VO59AutgNUifji2f+O/cbL5VYLiFPHJM16LkFj+5sgBbtxbyCx3on79f52rP/+12iVvMCPHGp8TIRNS/22hI40xLku9XTxel37LMDUPCvGKP6k4n708FEvdyJlgEYqis2tmhE+dGDZr/dl0KxR8f3KqN49yCTyAkg7kVLNvgHh72YViAd9Z81JMLcakAp+bkFM+RbCsMxLn1Wnism1Hjh/YsSp2ZMtqjIjq7LW+9SWnqrzODjCQijFGPxiC71Ynp/RJrZnjehzZ+Q9fNggLmTcf8AAAAABJRU5ErkJggg==)](https://www.griefed.de)
[![Blog](https://img.shields.io/badge/Griefed.de-Blog-c0ffee?style=for-the-badge&labelColor=325358&logo=wordpress)](https://www.griefed.de/blog)
[![Fleet](https://img.shields.io/badge/Griefed.de-Fleet-c0ffee?style=for-the-badge&labelColor=325358&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABiVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8XJWL///8gNCTuAAAAgXRSTlMAAgMEBQYHCAkLDA4PEBESFhgZGh0eISIlKC8zNDU3OT0+P0BBQkhKS01QU1RVVltcXWJjZGlrbG1wcnN0eHl6e4CBhYyOkJWWmZ6foaKkqaqsrrKztLe8vsHExcbHy8zNz9DT1NXX2Nna293e3+Tm5+nq7O3u7/Hy9fb4+fr7/f4zgtRAAAABWklEQVR42mKgHhCFMbg0dHW1xNGlBcw5wTS7tkcJoNV5UJItBoMA3GPjcm3btm3btq1+8s1JxijuV0p+X5NzVcfNRoT4O26ClEZykdydI5ddCHDt+EfqthiwYoXfRH++yb9r8IZ+o/CpeB1hE/zMtXf0KYKkP9p8ZSaCfq1S2ddDU84zrsuXYXZjYy0VcBxQKYVmgQ9slS8HhUbxSP+kNAPB+kIyO1ggr5mn9GoX70wKydA4/RNQQSVPvGspZEHQ5ZKHK5lu8UymUi/enRQuxYjcN5LPH+RTQfcVlQ4AbfJ1n4JKRusG0ErpzCn3vjFMe8g9/eUU2himHEAilc+Vq6XJ4Zyx6eXTk3f6/IOww7i2oOliXNXQ/H5kHBcWSO2MowyKJc4VU/BLOGcMm04EJF3FyHsQImkvMj/tQBhrz0to+rwSUf70XvjT23VWxKLLaBkYGuqr+Y8f9Q3q0fzzGED8cgAAAABJRU5ErkJggg==)](https://fleet.griefed.de)
[![GitHub](https://img.shields.io/badge/Griefed.de-Github-c0ffee?style=for-the-badge&labelColor=325358&logo=github)](https://github.com/Griefed)
[![DockerHub](https://img.shields.io/badge/Griefed.de-DockerHub-c0ffee?style=for-the-badge&labelColor=325358&logo=docker&logoColor=white)](https://hub.docker.com/u/griefed)
---
# $GITHUB_REPONAME
[![Docker Pulls](https://img.shields.io/docker/pulls/griefed/$DOCKERHUB_REPONAME?style=for-the-badge&logo=Docker&labelColor=325358&color=c0ffee&logoColor=white)](https://hub.docker.com/repository/docker/griefed/$DOCKERHUB_REPONAME)
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/griefed/$DOCKERHUB_REPONAME?label=Image%20size&sort=date&style=for-the-badge&logo=Docker&labelColor=325358&color=c0ffee&logoColor=white)](https://hub.docker.com/repository/docker/griefed/$DOCKERHUB_REPONAME)
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/griefed/$DOCKERHUB_REPONAME?label=Docker%20build&style=for-the-badge&logo=Docker&labelColor=325358&color=c0ffee&logoColor=white)](https://hub.docker.com/repository/docker/griefed/$DOCKERHUB_REPONAME)
[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/griefed/$DOCKERHUB_REPONAME?label=Docker%20build&style=for-the-badge&logo=Docker&labelColor=325358&color=c0ffee&logoColor=white)](https://hub.docker.com/repository/docker/griefed/$DOCKERHUB_REPONAME)
[![GitHub Repo stars](https://img.shields.io/github/stars/Griefed/$GITHUB_REPONAME?label=GitHub%20Stars&style=for-the-badge&logo=Github&labelColor=325358&color=c0ffee)](https://github.com/Griefed/$GITHUB_REPONAME)
[![GitHub forks](https://img.shields.io/github/forks/Griefed/$GITHUB_REPONAME?label=GitHub%20Forks&style=for-the-badge&logo=Github&labelColor=325358&color=c0ffee)](https://github.com/Griefed/$GITHUB_REPONAME)
$DESCRIPTION
[![$CREATOR_REPONAME]($GITHUB_REPONAME_SCREENSHOT)](https://github.com/$CREATOR_USERNAME/$CREATOR_REPONAME)
---
Creates a Container which runs [$CREATOR_USERNAME's](https://github.com/$CREATOR_USERNAME) [$CREATOR_REPONAME](https://github.com/$CREATOR_USERNAME/$CREATOR_REPONAME), with [$BASE_IMAGE](https://hub.docker.com/r/$BASE_IMAGE) as the base image, as seen on $EXAMPLE_SITE_LINK.
The [$BASE_IMAGE](https://hub.docker.com/r/$BASE_IMAGE) image is a custom base image built with [Alpine linux](https://alpinelinux.org/) and [S6 overlay](https://github.com/just-containers/s6-overlay).
Using this image allows us to use the same user/group ids in the container as on the host, making file transfers much easier
# Deployment
Tags | Description
-----|-------------
$DOCKERHUB_TAG_ONE | Use tag `$DOCKERHUB_TAG_ONE` if accessing $CREATOR_REPONAME via IP:PORT
$DOCKERHUB_TAG_TWO | Use tag `$DOCKERHUB_TAG_TWO` if accessing $CREATOR_REPONAME through a reverse proxy line NGINX
$DOCKERHUB_TAG_ONE-arm | Use tag `$DOCKERHUB_TAG_ONE-arm` if accessing $CREATOR_REPONAME via IP:PORT
$DOCKERHUB_TAG_TWO-arm | Use tag `$DOCKERHUB_TAG_TWO-arm` if accessing $CREATOR_REPONAME through a reverse proxy line NGINX
## Pre-built images
```docker-compose.yml
version: '3.6'
services:
$DOCKERHUB_REPONAME:
container_name: $DOCKERHUB_REPONAME
image: $DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME
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
ports:
- 3000:$CONTAINER_PORT
- $CONTAINER_PORT2
```
## Raspberry Pi
To run this container on a Raspberry Pi, use the `arm`-prefix for the `$DOCKERHUB_TAG_ONE`- and `$DOCKERHUB_TAG_TWO`-tags. I've tested the `$DOCKERHUB_TAG_ONE`-tag on a Raspberry Pi 3B.
`$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_ONE-arm`
`$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_TWO-arm`
# Configuration
Configuration | Explanation
------------ | -------------
[Restart policy](https://docs.docker.com/compose/compose-file/#restart) | "no", always, on-failure, unless-stopped
config volume | Contains config files and logs.
data volume | Contains your/the containers important data.
TZ | Timezone
PUID | for UserID
PGID | for GroupID
ports | The port where $DOCKERHUB_REPONAME will be available at. Only relevant when using `$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_ONE`
## 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.:
```json
"servers": [
{
"id": "<YOUR_SERVER_ID_HERE",
"default": true,
"ignoreChannels": ["TEXTCHANNEL_ID1","TEXTCHANNEL_ID2","TEXTCHANNEL_ID3"]
}
]
```
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
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'
services:
d-zone:
container_name: $DOCKERHUB_REPONAME
image: griefed/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_TWO
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
```
I use a dockerized NGINX as a reverse proxy, specifically [linuxserver/swag](https://hub.docker.com/r/linuxserver/swag).
```nginx
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name SUBDMOAIN.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
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 $upstream_app d-zone;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
```
## 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/$GITHUB_REPONAME/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:
$DOCKERHUB_REPONAME:
container_name: $DOCKERHUB_REPONAME
build: ./$GITHUB_REPONAME/
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:$CONTAINER_PORT
- $CONTAINER_PORT2
```
1. Clone the repository: `git clone https://github.com/Griefed/$GITHUB_REPONAME.git ./$GITHUB_REPONAME`
1. Rename **Dockerfile.$DOCKERHUB_TAG_ONE** to **Dockerfile**: `mv Dockerfile.$DOCKERHUB_TAG_ONE Dockerfile`
1. Prepare docker-compose.yml file as seen above
1. `docker-compose up -d --build $DOCKERHUB_REPONAME`
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