-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
019c1fe
commit 71e25a0
Showing
11 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To run in Production: | ||
|
||
1. Make sure that the correct DB password appears in `production.env` | ||
|
||
2. ```docker-compose -f production-compose.yml up -d``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM nginx | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
ADD conf.d/ /etc/nginx/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
server { | ||
|
||
listen 80; | ||
server_name internal-displacement.datafordemocracy.org; | ||
access_log /var/log/nginx/node.access.log main; | ||
charset utf-8; | ||
|
||
location / { | ||
proxy_pass http://nodejs:3322; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
#gzip on; | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3' | ||
services: | ||
jupyter: | ||
build: . | ||
image: internal-displacement | ||
command: sh -c "jupyter notebook --no-browser --ip=0.0.0.0 --port 3323 /internal-displacement/notebooks" | ||
stdin_open: true | ||
tty: true | ||
volumes: | ||
- .:/internal-displacement | ||
ports: | ||
- "3323:3323" | ||
env_file: production.env | ||
nodejs: | ||
build: internal-displacement-web | ||
image: internal-displacement-web | ||
volumes: | ||
- ./internal-displacement-web/src:/internal-displacement-web/src | ||
- ./internal-displacement-web/package.json:/internal-displacement-web/package.json | ||
- ./internal-displacement-web/index.html:/internal-displacement-web/index.html | ||
ports: | ||
- "3322:3322" | ||
env_file: production.env | ||
nginx: | ||
build: docker/nginx | ||
image: nginx | ||
ports: | ||
- "80:80" | ||
depends_on: | ||
- nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DB_HOST=internal-displacement.cf1y5y4ffeey.us-west-2.rds.amazonaws.com | ||
DB_USER=d4d | ||
DB_PASS= | ||
DB_NAME=id | ||
PYTHONPATH=/internal-displacement | ||
NODE_ENV=production |