Skip to content

Instantly share code, notes, and snippets.

@AlexanderAllen
Created January 14, 2020 01:36
Show Gist options
  • Save AlexanderAllen/a81277223fab899b8b754baa674c55a0 to your computer and use it in GitHub Desktop.
Save AlexanderAllen/a81277223fab899b8b754baa674c55a0 to your computer and use it in GitHub Desktop.
Forward logs to Nginx as non-root user, by using the tty parameter
nginx:
image: alexanderallen/nginx:1.17-alpine
tty: true
entrypoint: 'su-exec nobody /usr/sbin/nginx -g "daemon off;"'
ports:
- 80:8080
- 443:443
healthcheck:
test: curl --fail -s http://localhost:80 || exit 1
interval: 30s
timeout: 10s
retries: 2
volumes:
- app:/app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment