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

Add .github stuffs and fix readme stuffs

parent cd63ae7b
No related branches found
No related tags found
No related merge requests found
---
name: Bug Report
about: Report a bug with the container / image
---
* **What is the current behavior?**
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**
* **What is the expected behavior?**
* **What is the motivation / use case for changing the behavior?**
* **Please tell us about your environment:**
- Docker Image: griefed/image:tag e.g. griefed/d-zone:proxy
- docker & docker-compose Version: Use `docker version && docker-compose version`
```
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:52 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:20 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.5
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
```
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
blank_issues_enabled: false
---
name: Documentation Request
about: Request for documentation about a certain aspect of the docker image / container
---
# Documentation Request
<!-- Delete this line and everything below it, but read below first for information on what you should include -->
Please include the following:
* Links to any existing documentation if it exists but is unclear.
* Information on what feature/aspect of this container needs updating / expansion.
* What you're currently trying to do with the container that has led you to require the given feature.
* Some background on what information you might like to see in the documentation.
---
name: Pull Request
about: Pull request for a change / addition / fix you made to the repository.
---
* **Please check if the PR fulfills these requirements**
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
* **What is the current behavior?** (You can also link to an open issue here)
* **What is the new behavior (if this is a feature change)?**
* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
* **Other information**:
...@@ -46,7 +46,7 @@ test_port: ...@@ -46,7 +46,7 @@ test_port:
- shell - shell
script: script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --network host --tag $CI_REGISTRY_IMAGE:arm-port -f Dockerfile.port . - docker build --network host --tag $CI_REGISTRY_IMAGE:arm-port -f Dockerfile.port .
- docker push $CI_REGISTRY_IMAGE:arm-port - docker push $CI_REGISTRY_IMAGE:arm-port
test_proxy: test_proxy:
...@@ -55,7 +55,7 @@ test_proxy: ...@@ -55,7 +55,7 @@ test_proxy:
- shell - shell
script: script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --network host --tag $CI_REGISTRY_IMAGE:arm-proxy -f Dockerfile.proxy . - docker build --network host --tag $CI_REGISTRY_IMAGE:arm-proxy -f Dockerfile.proxy .
- docker push $CI_REGISTRY_IMAGE:arm-proxy - docker push $CI_REGISTRY_IMAGE:arm-proxy
publish_port: publish_port:
......
export GITHUB_REPONAME='docker-template-repo' export GITHUB_REPONAME='docker-D-Zone'
export GITHUB_USERNAME='username' export GITHUB_USERNAME='Griefed'
export DOCKERHUB_REPONAME='template-repo' export DOCKERHUB_REPONAME='d-zone'
export DOCKERHUB_TAG='tag' export DOCKERHUB_TAG_ONE='port'
export DOCKERHUB_USERNAME='username' export DOCKERHUB_TAG_TWO='proxy'
export DESCRIPTION='This is an example description for the docker-template-repo. This text should be replaced with an adequate description of the repo this template was clone for. Blablablablablabla you know the drill.' export DOCKERHUB_USERNAME='griefed'
export CREATOR_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_REPONAME='template' export CREATOR_USERNAME='d-zone-org'
export EXAMPLE_SITE_LINK='https://www.example.com' export CREATOR_REPONAME='d-zone'
export CONTAINER_PORT='1234' export EXAMPLE_SITE_LINK='https://pixelatomy.com/dzone/?s=default'
export CONTAINER_PORT='3000'
export BASE_IMAGE='alpine'
\ No newline at end of file
...@@ -24,31 +24,37 @@ Using this image allows us to use the same user/group ids in the container as on ...@@ -24,31 +24,37 @@ Using this image allows us to use the same user/group ids in the container as on
## Deployment ## Deployment
### Pre-built images 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
```docker-compose.yml ```docker-compose.yml
version: '3.6' version: '3.6'
services: services:
$DOCKERHUB_REPONAME: $DOCKERHUB_REPONAME:
container_name: $DOCKERHUB_REPONAME container_name: $DOCKERHUB_REPONAME
image: griefed/$DOCKERHUB_REPONAME image: $DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./path/to/config:/config - ./path/to/config:/config
environment: environment:
- TOKEN=<YOUR_BOT_TOKEN_HERE>
- TZ=Europe/Berlin - TZ=Europe/Berlin
- PUID=1000 # User ID - PUID=1000 # User ID
- PGID=1000 # Group ID - PGID=1000 # Group ID
ports: ports:
- 80:$CONTAINER_PORT - 3000:$CONTAINER_PORT
- $CONTAINER_PORT2 - $CONTAINER_PORT2
``` ```
## Raspberry Pi ## Raspberry Pi
To run this container on a Raspberry Pi, use the `arm`-tag. I've tested it on a Raspberry Pi 3B. 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.
`griefed/$DOCKERHUB_REPONAME:arm` `$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_ONE-arm`
`$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_TWO-arm`
## Configuration ## Configuration
...@@ -60,7 +66,7 @@ data volume | Contains your/the containers important data. ...@@ -60,7 +66,7 @@ data volume | Contains your/the containers important data.
TZ | Timezone TZ | Timezone
PUID | for UserID PUID | for UserID
PGID | for GroupID PGID | for GroupID
ports | The port where the service will be available at. ports | The port where $DOCKERHUB_REPONAME will be available at. Only relevant when using `$DOCKERHUB_USERNAME/$DOCKERHUB_REPONAME:$DOCKERHUB_TAG_ONE`
## User / Group Identifiers ## User / Group Identifiers
...@@ -75,6 +81,88 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel ...@@ -75,6 +81,88 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
``` ```
## 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;
}
}
```
### Building the image yourself ### 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 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
...@@ -100,6 +188,7 @@ services: ...@@ -100,6 +188,7 @@ services:
``` ```
1. Clone the repository: `git clone https://github.com/Griefed/$GITHUB_REPONAME.git ./$GITHUB_REPONAME` 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. Prepare docker-compose.yml file as seen above
1. `docker-compose up -d --build $DOCKERHUB_REPONAME` 1. `docker-compose up -d --build $DOCKERHUB_REPONAME`
1. Visit IP.ADDRESS.OF.HOST:8080 1. Visit IP.ADDRESS.OF.HOST:8080
......
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