wvanheemstra
Please show me how I deploy a custom configured NGinX server with nix packages in Dokploy
services:
nginx:
image: nginx:latest
ports:
- "${APP_PORT}:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- dokploy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${HASH}.rule=Host(
${APP_HOST}
)"
- "traefik.http.routers.${HASH}.entrypoints=websecure"
- "traefik.http.routers.${HASH}.tls.certResolver=letsencrypt"
- "traefik.http.services.${HASH}.loadbalancer.server.port=${APP_PORT}"
whoami:
image: traefik/whoami
ports:
- "80"
networks:
- dokploy-network
networks:
dokploy-network:
external: true34 replies
Please show me how I deploy a custom configured NGinX server with nix packages in Dokploy
Thank you @Siumauricio your answer is fantastic and detailed! All works well, but when I try to check from a browser with server IP and port 8081 I get a warning “This site can’t be reached” instead of what you posted here. What is your advice, please.
34 replies
Please show me how I deploy a custom configured NGinX server with nix packages in Dokploy
It looks like the issue lies with Environment variables not being picked up. For example through the Dokploy user interface I have set an environment variable “ APP_PORT=8081”, whereas the log of my deployment states “… msg=“The ”APP_PORT” variable is not set. Defaulting to a blank string.”
34 replies