Combined Dockerfile for single-container hosting #236
AdamLassiter
started this conversation in
Ideas
Replies: 1 comment
-
|
For what it's worth, my docker-compose.yml can then simply be: services:
ogres:
build:
context: ogres
dockerfile: ./deploy/combined.dockerfile
args:
VERSION: "v0.25.2"
PUBLIC_SOCKET_URL: "wss://ogres.${ROOT_DOMAIN}/ws"
container_name: ogres
restart: always
labels:
traefik.http.services.ogres.loadbalancer.server.port: 80and traefik.yml: http:
routers:
ogres:
rule: Host(`ogres.${ROOT_DOMAIN}`)
service: ogres@docker |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Thanks for building and maintaining Ogres. I’ve been setting up a self-hosted instance behind Traefik and Cloudflare Tunnel, and I ended up making a small deployment-oriented change that may be useful upstream.
The current Docker setup splits the app across separate frontend, backend, and nginx services, with the nginx image also cloning the
gh-pagesbranch for release fallback assets. That works well for the existing compose flow, but it is a little awkward in environments where the operator wants a single deployable container behind an existing reverse proxy.I’ve put together an alternative combined Dockerfile that:
/play,/release/*, and/releases.txtthrough nginx/wsinternally to the backend on127.0.0.1:8090gh-pagesat image build time, so the image is built from the checked-out repository contentsAdamLassiter@2d60eb6
The intended use case is self-hosting behind something like Traefik/Caddy/nginx where TLS is already terminated outside the app container, for example with Cloudflare Tunnel in front.
One implementation detail I hit: with current npm, the root
package-lock.jsonappears to be out of sync around esbuild’s optional platform packages, sonpm cifails in a fresh container build unless the lock is refreshed first. I handled that in my local Dockerfile build layer, but I wanted to flag it separately because it may be worth addressing directly in the lockfile.Would you be open to a PR adding this as an optional deployment target under
deploy/, without changing the existing multi-service Docker setup?Beta Was this translation helpful? Give feedback.
All reactions