Commit 16163d8a authored by Timothee Gosselin's avatar Timothee Gosselin

Initial commit

parents
Pipeline #12869 failed with stages
in 21 seconds
FROM nginx:1.17.0-alpine
COPY nginx.tmpl /etc/nginx/nginx.tmpl
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
#!/usr/bin/env sh
set -eu
envsubst '${SERVER_HOST} ${SERVER_PORT}' < /etc/nginx/nginx.template > /etc/nginx/nginx.conf
exec "$@"
version: '2.4'
networks:
lb_web:
external: true
back:
driver: bridge
services:
web:
build:
context: .
dockerfile: ./Dockerfile
environment:
- VIRTUAL_HOST
- SERVER_HOST
- SERVER_PORT
- LETSENCRYPT_HOST
- LETSENCRYPT_EMAIL
networks:
- back
- lb_web
ports:
- 80
nginx-proxy:
image: nginx:1.17.0-alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
networks:
- back
docker-gen:
image: jwilder/docker-gen
container_name: nginx-proxy-gen
command: -notify-sighup nginx-proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes_from:
- nginx-proxy
volumes:
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"
networks:
- back
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-proxy-le
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- back
volumes:
conf:
vhost:
html:
certs:
VIRTUAL_HOST=yourdomain.tld
SERVER_HOST=web
SERVER_PORT=80
LETSENCRYPT_HOST=yourdomain.tld
LETSENCRYPT_EMAIL=your@email.com
This diff is collapsed.
user nginx;
events {
worker_connections 768;
}
http {
upstream backend {
server ${SERVER_HOST}:${SERVER_PORT};
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Sets the path, format, and configuration for a buffered log write
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $upstream_addr '
'"$http_referer" "$http_user_agent"';
server_tokens off;
server {
listen 80;
access_log /var/log/nginx/access.log compression;
location / {
proxy_pass http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/datatype_objects.cgi;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment