From 203ec7f43497254071732e6ab79ec2b8436677e8 Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 10 Feb 2023 21:29:50 -0800 Subject: [PATCH] Docker image required files --- .gitignore | 2 ++ docker/beta/Dockerfile | 5 +++++ docker/beta/nginx.conf | 48 ++++++++++++++++++++++++++++++++++++++++++ docker/readme | 1 + 4 files changed, 56 insertions(+) create mode 100644 docker/beta/Dockerfile create mode 100644 docker/beta/nginx.conf create mode 100644 docker/readme diff --git a/.gitignore b/.gitignore index 9598cdc..bd8fba7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ playbooks/alpha/searx/settings.yml playbooks/beta/vars/*.yml playbooks/env/ playbooks/beta/files/*.pub + +docker/beta/shockrah.xyz/ diff --git a/docker/beta/Dockerfile b/docker/beta/Dockerfile new file mode 100644 index 0000000..b634d98 --- /dev/null +++ b/docker/beta/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx +ARG SRC +RUN mkdir -p /var/www/blog.shockrah.xyz +COPY shockrah.xyz /var/www/blog.shockrah.xyz +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/docker/beta/nginx.conf b/docker/beta/nginx.conf new file mode 100644 index 0000000..c21939c --- /dev/null +++ b/docker/beta/nginx.conf @@ -0,0 +1,48 @@ +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; + include /etc/nginx/conf.d/*.conf; + + # Testing blog routing + server { + server_name "blog.shockrah.xyz"; + location / { + return 200 'Visiting blog.shockrah.xyz'; + root /var/www/blog.shockrah.xyz; + } + } + + server { + server_name "wiki.shockrah.xyz"; + location / { + return 200 'Reading wiki.shockrah.xyz'; + } + } +} + diff --git a/docker/readme b/docker/readme new file mode 100644 index 0000000..b795211 --- /dev/null +++ b/docker/readme @@ -0,0 +1 @@ +This folder contains docker images that live in ECR