Last active
November 11, 2023 13:00
-
-
Save jonshipman/f25d9bd7c4a2e328c13160f46a90496c to your computer and use it in GitHub Desktop.
Nginx Reverse Proxy with Acme Companion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
reverse-proxy: | |
container_name: 'reverse-proxy' | |
restart: 'always' | |
image: 'nginxproxy/nginx-proxy' | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- '/var/run/docker.sock:/tmp/docker.sock:ro' | |
- './certs:/etc/nginx/certs' | |
- './vhost.d:/etc/nginx/vhost.d' | |
- './html:/usr/share/nginx/html' | |
network_mode: bridge | |
selfsigned-companion: | |
container_name: 'selfsigned-companion' | |
restart: 'always' | |
depends_on: | |
- reverse-proxy | |
environment: | |
- NGINX_PROXY_CONTAINER=reverse-proxy | |
volumes: | |
- '/var/run/docker.sock:/var/run/docker.sock:ro' | |
- './certs:/etc/nginx/certs:rw' | |
image: 'sebastienheyd/self-signed-proxy-companion' | |
network_mode: bridge | |
acme-companion: | |
container_name: 'acme-companion' | |
restart: 'always' | |
depends_on: | |
- selfsigned-companion | |
environment: | |
- [email protected] | |
volumes: | |
- '/var/run/docker.sock:/var/run/docker.sock:ro' | |
- './acme:/etc/acme.sh' | |
volumes_from: | |
- reverse-proxy | |
image: 'nginxproxy/acme-companion' | |
network_mode: bridge | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
app: | |
restart: 'always' | |
image: node:20-alpine | |
working_dir: '/app' | |
command: 'npm run start' | |
expose: | |
- 3000 | |
environment: | |
VIRTUAL_HOST: demo.your-domain.com | |
LETSENCRYPT_HOST: demo.your-domain.com | |
VIRTUAL_PORT: 3000 | |
volumes: | |
- './repo:/app' | |
network_mode: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment