mirror of https://github.com/nucypher/nucypher.git
Add porter docker-compose to use nginx reverse proxy with support for SSL and CORS.
parent
59d653d647
commit
8e5dc8f0f6
|
@ -0,0 +1,4 @@
|
|||
FROM nginxproxy/nginx-proxy:alpine
|
||||
|
||||
# Copy porter.local location additional configuration
|
||||
COPY ./deploy/docker/porter/nginx/porter.local_location /etc/nginx/vhost.d/
|
|
@ -0,0 +1,37 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
nginx-proxy:
|
||||
restart: always
|
||||
image: nginxproxy/nginx-proxy:alpine
|
||||
build:
|
||||
context: ../../../..
|
||||
dockerfile: deploy/docker/porter/nginx/Dockerfile
|
||||
ports:
|
||||
- "443:443"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
# because of the vhost name used below, the cert and key should be named "porter.local.crt" and "porter.local.key" respectively
|
||||
- "${TLS_DIR}:/etc/nginx/certs/"
|
||||
|
||||
nginx-porter:
|
||||
restart: on-failure
|
||||
image: porter:latest
|
||||
build:
|
||||
context: ../../../..
|
||||
dockerfile: deploy/docker/porter/Dockerfile
|
||||
expose:
|
||||
# Default Porter port
|
||||
- "9155"
|
||||
volumes:
|
||||
- .:/code
|
||||
- ~/.local/share/nucypher:/nucypher
|
||||
command: [ "nucypher", "porter", "run",
|
||||
"--provider", "${WEB3_PROVIDER_URI}",
|
||||
"--network", "${NUCYPHER_NETWORK}" ]
|
||||
environment:
|
||||
- VIRTUAL_HOST=porter.local
|
||||
- VIRTUAL_PORT=9155
|
||||
depends_on:
|
||||
- nginx-proxy
|
|
@ -0,0 +1,4 @@
|
|||
#
|
||||
# Allow CORS for any domain - should be editied if specific domains are desired
|
||||
#
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
Loading…
Reference in New Issue