Skip to content

Instantly share code, notes, and snippets.

@maikeulb
Created April 19, 2018 22:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maikeulb/5660dd2ed21c36d75a34602fbc67b9e5 to your computer and use it in GitHub Desktop.
Save maikeulb/5660dd2ed21c36d75a34602fbc67b9e5 to your computer and use it in GitHub Desktop.
version: '3'
services:
flask:
restart: always
volumes:
- static:/app/app/static/
env_file:
- ./src/.env
db:
restart: always
env_file:
- ./src/.env
nginx:
restart: always
container_name: nginx
build: ./src/nginx
ports:
- "80:80"
- "443:443"
volumes:
- static:/app/app/static/
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
depends_on:
- flask
letsencrypt:
restart: always
container_name: letsencrypt
image: jrcs/letsencrypt-nginx-proxy-companion
environment:
NGINX_PROXY_CONTAINER: nginx
NGINX_DOCKER_GEN_CONTAINER: nginx
volumes:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- nginx
volumes:
html:
certs:
vhost:
static:
version: '3'
services:
flask:
build: ./src
environment:
- FLASK_APP_CONFIG=config.ProductionConfig
- VIRTUAL_HOST=filmogram.net,www.filmogram.net
- VIRTUAL_PORT=5000
- LETSENCRYPT_HOST=filmogram.net,www.filmogram.net
- LETSENCRYPT_EMAIL=michael.sergio.barnes@gmail.com
depends_on:
- db
db:
image: postgres:9.6.5
volumes:
- db:/var/lib/postgresql/data
volumes:
db:
FROM jwilder/nginx-proxy:alpine
COPY proxy.conf /etc/nginx/conf.d/
server_tokens off;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment