aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrodokk <brodokk@brodokk.space>2021-11-16 18:27:22 +0100
committerbrodokk <brodokk@brodokk.space>2021-11-16 18:27:22 +0100
commitcef0b02205c9bd409ecc2fc021ade564c7ff36d9 (patch)
tree4427dbd6ae6aed955512905312fdb4f5635df6f4
parent02dd6b7942c366da9ee2cf16375585443512c05f (diff)
downloadneosvr_docker-cef0b02205c9bd409ecc2fc021ade564c7ff36d9.tar.xz
neosvr_docker-cef0b02205c9bd409ecc2fc021ade564c7ff36d9.zip
Add portainer support
Diffstat (limited to '')
-rw-r--r--README.md26
-rw-r--r--docker-compose.yml3
-rw-r--r--docker-compose_portainer.yml42
3 files changed, 70 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8afa1e6..df21b4a 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,8 @@ For that set `LOGIN` and `PASSWORD` environment variables.
You also need the beta key who can be set via the `BETA-KEY` environment
variable.
+## Simple usage
+
Before using it you need to build it and then use it, for example, directly
via docker with the following commands. Keep in mind this took some time, so be
patient.
@@ -38,6 +40,8 @@ spaces) but not needed actually for the NeosVR headless client. And the second
environement variable is for define the app to be launched at start. Both have
as default value the actual NeosVR headless client id `740250`.
+## Docker Compose
+
You can also launch it via docker-compose with the example file
`docker-compose.yml` provided.
@@ -48,6 +52,28 @@ command if you want to control the server.
docker attach <container_name>
```
+## Docker Compose with portainer
+
+You can also use this with this portainer. Launch the stack in
+`docker-compose_portainer.yml` and then import the normal
+`docker-compose.yml` via the web interface.
+
+```
+docker-compose -f docker-compose_portainer.yml up
+```
+
+You will need to replace the three following string in the compose file for
+make it work: `<EMAIL>`, `<PASSWORD>`, `<DOMAIN>`.
+
+For generate password you will need to use the following command (replace `mycutepassword` by your password):
+
+```
+docker run --rm httpd:2.4-alpine htpasswd -nbB admin 'mycutepassword' | cut -d ":" -f 2
+```
+
+And the add `$` in front of all the `$` otherwise you will have a parsing error.
+More information here: https://gist.github.com/deviantony/62c009b41bde5e078b1a7de9f11f5e55
+
# Notes
If you have frequent GC crashes you need to set `vm.max_map_count=262144` in
diff --git a/docker-compose.yml b/docker-compose.yml
index 9ae88a6..7801d44 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,9 +1,10 @@
version: "3.7"
services:
+
neosvr:
build: .
- environment:
+ environment:
LAUNCH_APP: 740250
INSTALL_APPS: 740250
LOGIN: user
diff --git a/docker-compose_portainer.yml b/docker-compose_portainer.yml
new file mode 100644
index 0000000..14a5440
--- /dev/null
+++ b/docker-compose_portainer.yml
@@ -0,0 +1,42 @@
+version: "3.7"
+
+services:
+
+ reverse-proxy:
+ image: traefik:v2.4
+ command:
+ - --providers.docker
+ - --entrypoints.web.address=:80
+ - --entrypoints.websecure.address=:443
+ - --providers.docker
+ - --certificatesresolvers.leresolver.acme.httpchallenge=true
+ - --certificatesresolvers.leresolver.acme.email=<EMAIL>
+ - --certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web
+ - --certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json"
+ ports:
+ - "80:80"
+ - "443:443"
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - ./letsencrypt:/letsencrypt
+ labels:
+ - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
+ - "traefik.http.routers.http-catchall.entrypoints=web"
+ - "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
+ - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
+
+ portainer:
+ image: portainer/portainer-ce:2.0.0
+ command: -H unix:///var/run/docker.sock --admin-password '<PASSWORD>'
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock:ro
+ - /etc/localtime:/etc/localtime:ro
+ - ./dataportainer:/data
+ labels:
+ - "traefik.enable=true"
+ - "traefik.http.routers.portainer_frontend.rule=Host(`<DOMAIN>`)"
+ - "traefik.http.routers.portainer_frontend.entrypoints=websecure"
+ - "traefik.http.routers.portainer_frontend.service=portainer_frontend"
+ - "traefik.http.routers.portainer_frontend.tls=true"
+ - "traefik.http.routers.portainer_frontend.tls.certresolver=leresolver"
+ - "traefik.http.services.portainer_frontend.loadbalancer.server.port=9000"