Skip to content

Commit

Permalink
.27: Auto stash before cherrypick of "Add SSL Script and update build…
Browse files Browse the repository at this point in the history
… script"
  • Loading branch information
wrathagom committed Jul 22, 2019
1 parent e089513 commit e44db32
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 8 deletions.
File renamed without changes.
10 changes: 9 additions & 1 deletion dev-compose-override.yml → compose/develop-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: '3.0'

services:
nginx:
ports: ['${PORT:-8080}:80']
api:
build: './api/.'
ports: ['7500']
ports: ['7500:7500']
ui:
ports: ['3000:3000']
build:
Expand All @@ -14,6 +16,12 @@ services:
rasa:
build:
context: './rasa/.'
ports: ['5000:5000']
duckling:
build:
context: './duckling/.'
ports: ['8000:8000']
redis:
ports: ['6379:6379']
elasticsearch:
ports: ['9200:9200']
File renamed without changes.
18 changes: 18 additions & 0 deletions compose/ssl-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.0'

services:
nginx:
ports:
- '80:80'
- '443:443'
volumes:
- ./local-storage/nginx/nginx.ssl.conf:/etc/nginx/conf.d/default.conf
- ./local-storage/certbot/conf:/etc/letsencrypt
- ./local-storage/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
volumes:
- ./local-storage/certbot/conf:/etc/letsencrypt
- ./local-storage/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
File renamed without changes.
17 changes: 17 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.0'

services:
nginx:
ports: ['${PORT:-8080}:80']
api:
ports: ['${API_PORT:-7500}:7500']
ui:
ports: ['3000']
rasa:
ports: ['5000:5000']
duckling:
ports: ['8000:8000']
redis:
ports: ['6379:6379']
elasticsearch:
ports: ['9200:9200']
7 changes: 0 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,18 @@ services:
volumes:
- ./local-storage/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./local-storage/nginx/nginx-http.conf:/etc/nginx/nginx.conf
ports: ['${PORT:-8080}:80']
command: [nginx-debug, '-g', 'daemon off;']
api:
image: samtecspg/articulate-api:0.27.0
ports: ['${API_PORT:-7500}:7500']
ui:
image: samtecspg/articulate-ui:0.27.0
ports: ['3000']
rasa:
image: samtecspg/articulate-rasa:0.27.0
ports: ['5000:5000']
volumes: ["${MODEL_DIR:-./local-storage/rasa/nlu-model}:/app/projects", "${RASA_CONFIG:-./local-storage/rasa/rasa-config.yml}:/app/config.yml", "./local-storage/rasa/logs:/app/logs"]
duckling:
image: samtecspg/duckling:0.1.6.0
ports: ['8000:8000']
redis:
image: redis:4.0.6-alpine
ports: ['6379:6379']
command: redis-server --appendonly yes
volumes:
- ${REDIS_DATA:-./local-storage/redis-data}:/data
Expand All @@ -37,7 +31,6 @@ services:
memlock:
soft: -1
hard: -1
ports: ['9200:9200']
volumes:
- ${ES_CONFIG:-./local-storage/elasticsearch/config/elasticsearch.yml}:/usr/share/elasticsearch/config/elasticsearch.yml
- ${ES_DATA:-./local-storage/elasticsearch/data}:/usr/share/elasticsearch/data
Expand Down
46 changes: 46 additions & 0 deletions local-storage/nginx/nginx.ssl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
server {
listen 80;
server_name arty-test.articulate.chat;
server_tokens off;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

location / {
return 301 https://$host$request_uri;
}
}


server {
listen 443 ssl;
server_name arty-test.articulate.chat;
server_tokens off;

ssl_certificate /etc/letsencrypt/live/arty-test.articulate.chat/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/arty-test.articulate.chat/privkey.pem;

include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

location /api {
proxy_pass http://api:7500;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-scheme $scheme;
proxy_set_header X-request-uri $request_uri;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
rewrite ^/api(.*)$ $1 break;
}

location / {
proxy_pass http://ui:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}

}

0 comments on commit e44db32

Please sign in to comment.