diff --git a/docker-compose.override.yml b/docker-compose.override.yml deleted file mode 100644 index d42f896..0000000 --- a/docker-compose.override.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '3' -services: - web: - build: . - environment: - APP_ENV: development - VIRTUAL_HOST: localhost - ports: - - "8080:8080" diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml deleted file mode 100644 index 9ded7b0..0000000 --- a/docker-compose.prod.yml +++ /dev/null @@ -1,45 +0,0 @@ -version: '3' -services: - db: - restart: unless-stopped - web: - env_file: .env - image: hakanensari/frankfurter - logging: - options: - max-size: "50m" - max-file: "10" - restart: unless-stopped - nginx-proxy: - image: jwilder/nginx-proxy - labels: - - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" - logging: - options: - max-size: "50m" - max-file: "10" - ports: - - "80:80" - - "443:443" - restart: unless-stopped - volumes: - - /etc/nginx/conf.d - - /var/run/docker.sock:/tmp/docker.sock:ro - - ./limit_req.conf:/etc/nginx/conf.d/limit_req.conf:ro - - certs:/etc/nginx/certs:ro - - html:/usr/share/nginx/html - - vhost.d:/etc/nginx/vhost.d - letsencrypt-nginx-proxy-companion: - image: jrcs/letsencrypt-nginx-proxy-companion - depends_on: - - nginx-proxy - restart: unless-stopped - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - certs:/etc/nginx/certs:rw - - html:/usr/share/nginx/html - - vhost.d:/etc/nginx/vhost.d -volumes: - certs: - html: - vhost.d: diff --git a/docker-compose.yml b/docker-compose.yml index 2ff5f77..fdb41b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,66 @@ version: '3' + services: db: image: postgres + restart: unless-stopped volumes: - data:/var/lib/postgresql/data + web: command: unicorn -c config/unicorn.rb entrypoint: bin/wait-for-it.sh db:5432 -s -- + env_file: .env environment: DATABASE_URL: postgres://postgres@db/postgres expose: - '8080' + image: hakanensari/frankfurter links: - db + logging: + options: + max-size: "50m" + max-file: "10" + restart: unless-stopped + + nginx-proxy: + image: jwilder/nginx-proxy + labels: + - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" + logging: + options: + max-size: "50m" + max-file: "10" + ports: + - "80:80" + - "443:443" + restart: unless-stopped + volumes: + - /etc/nginx/conf.d + - /var/run/docker.sock:/tmp/docker.sock:ro + - ./limit_req.conf:/etc/nginx/conf.d/limit_req.conf:ro + - certs:/etc/nginx/certs:ro + - html:/usr/share/nginx/html + - vhost.d:/etc/nginx/vhost.d + + letsencrypt-nginx-proxy-companion: + depends_on: + - nginx-proxy + image: jrcs/letsencrypt-nginx-proxy-companion + logging: + options: + max-size: "50m" + max-file: "10" + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - certs:/etc/nginx/certs:rw + - html:/usr/share/nginx/html + - vhost.d:/etc/nginx/vhost.d + volumes: + certs: data: + html: + vhost.d: