We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run Logux server in Docker with Dockerfile example
Dockerfile
The text was updated successfully, but these errors were encountered:
This is config for traefik. Add index.js, package.json to logux folder, than create docker-compose.yml:
version: "3.7" networks: web: external: true services: loguxserver: image: node:17-alpine command: sh -c "npm install&&node index.js" expose: - 31337 labels: - "traefik.enable=true" - "traefik.http.routers.loguxhttps.entrypoints=https" - "traefik.http.routers.loguxhttps.rule=Host(`mydomain.com`)" - "traefik.http.routers.loguxhttps.tls=true" - "traefik.http.routers.loguxhttps.tls.certresolver=letsEncrypt" - "traefik.docker.network=web" - "traefik.port=31337" networks: - web environment: LOGUX_BACKEND: http://localhost:3001/ LOGUX_CONTROL_SECRET: secret LOGUX_CONTROL_MASK: 0.0.0.0/0 TZ: "Europe/Moscow" working_dir: /app volumes: - ./logux/:/app
Sorry, something went wrong.
(Just a few thoughts so I don't forget.)
We already have a basic recipe for Dockerfile: https://github.com/logux/docs/blob/main/recipes/deployment.md.
But I think it is not enough for a beginners. We need to add:
pnpm fetch
FROM node:20 RUN corepack enable RUN corepack prepare pnpm@latest --activate WORKDIR /project COPY pnpm-lock.yaml ./ RUN pnpm fetch ADD . ./ RUN pnpm install -r --offline
healthcheck: test: "curl -f http://localhost:${LOGUX_PORT}/health || exit 1" interval: 10s timeout: 5s retries: 5
LOGUX_
LOGUX_CONTROL_MASK
DOCKER_NETWORK_SUBNET=172.28.0.0/16 DOCKER_NETWORK_GATEWAY=172.28.0.1 LOGUX_CONTROL_MASK=172.28.0.0/16
networks: default: ipam: driver: default config: - subnet: ${DOCKER_NETWORK_SUBNET} gateway: ${DOCKER_NETWORK_GATEWAY}
No branches or pull requests
How to run Logux server in Docker with
Dockerfile
exampleThe text was updated successfully, but these errors were encountered: