Skip to content

Instantly share code, notes, and snippets.

@binura-g
Created August 11, 2017 04:59
Show Gist options
  • Save binura-g/bbb886b49206b9e265b83af2ced765b1 to your computer and use it in GitHub Desktop.
Save binura-g/bbb886b49206b9e265b83af2ced765b1 to your computer and use it in GitHub Desktop.
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
proxy_pass http://localhost:1313/;
}
}
version: '2'
services:
nginx:
restart: always
build:
context: .
dockerfile: Dockerfile-nginx
container_name: nginx-container
ports:
- "443:443"
- "80:80"
web:
restart: always
build:
context: .
dockerfile: Dockerfile
container_name: timesheetapp
environment:
- NODE_ENV=production
- DB_1_PORT_27017_TCP_ADDR=db
depends_on:
- db
ports:
- "1313:1313"
db:
image: mongo:3.2
ports:
- "27017:27017"
restart: always
volumes_from:
- db-data
db-data:
image: mongo:3.2
volumes:
- /data/db
- /var/lib/mongodb
- /var/log/mongodb
entrypoint: /bin/true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment