Cleaning up Docker resources
Adding ez build script
This commit is contained in:
parent
f4e06fa24a
commit
ffe5ffe831
12
docker/beta/build.sh
Normal file
12
docker/beta/build.sh
Normal file
@ -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
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
9
docker/beta/run.sh
Normal file
9
docker/beta/run.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user