diff --git a/docker/beta/build.sh b/docker/beta/build.sh new file mode 100644 index 0000000..c6b71f0 --- /dev/null +++ b/docker/beta/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + + +# Build the image +docker build . -t reverse-proxy:latest +docker tag reverse-proxy:latest 805875567437.dkr.ecr.us-west-1.amazonaws.com/reverse-proxy:latest + +# ECR Authentication +aws ecr get-login-password --region us-west-1 | docker login --username AWS --password-stdin 805875567437.dkr.ecr.us-west-1.amazonaws.com + +# Pushing tagged image +docker push 805875567437.dkr.ecr.us-west-1.amazonaws.com/reverse-proxy:latest diff --git a/docker/beta/nginx.conf b/docker/beta/nginx.conf deleted file mode 100644 index 606adfc..0000000 --- a/docker/beta/nginx.conf +++ /dev/null @@ -1,57 +0,0 @@ -user nginx; -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - - -events { - worker_connections 1024; -} - - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # This logging is way overkill and not at all permanent - # Just for debugging for now - log_format main '$host $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; - gzip_min_length 2048; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/xml text/javascript application/x-jacascript application/xml; - gzip_disable "MSIE [1-6]\."; - include /etc/nginx/conf.d/*.conf; - - server { - server_name "shockrah.xyz"; - - root /var/www/shockrah.xyz; - index index.html; - - location / { - try_files $uri $uri/ =404; - } - } - server { - server_name "resume.shockrah.xyz"; - - root /var/www/resume.shockrah.xyz; - index index.html; - - location / { - try_files $uri $uri/ =404; - } - } -} - diff --git a/docker/beta/run.sh b/docker/beta/run.sh new file mode 100644 index 0000000..2f02076 --- /dev/null +++ b/docker/beta/run.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +docker run --publish 80:80 --name gateway --rm \ + -e S3_ACCESS_KEY_ID="$(pass dev/project-athens-admin/key_id)" \ + -e S3_SECRET_KEY="$(pass dev/project-athens-admin/secret)" \ + -e S3_REGION=us-west-1 \ + -e S3_SERVER=s3-us-west-1.amazonaws.com \ + -e S3_BUCKET_NAME=shockrah-xyz-static-content \ + reverse-proxy