aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2024-04-08-docker-local-web-server.org
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2025-03-11 16:09:26 -0500
committerChristian Cleberg <hello@cleberg.net>2025-03-11 16:09:26 -0500
commit75cb2408e9251a32779a2c8814d4aaf1a0aae57c (patch)
treefddf8653aa26a9486ed9e2f56c2215b1742f9f92 /content/blog/2024-04-08-docker-local-web-server.org
parentb6068f40908e9185fa8b04df1ebde52866f81296 (diff)
downloadcleberg.net-75cb2408e9251a32779a2c8814d4aaf1a0aae57c.tar.gz
cleberg.net-75cb2408e9251a32779a2c8814d4aaf1a0aae57c.tar.bz2
cleberg.net-75cb2408e9251a32779a2c8814d4aaf1a0aae57c.zip
move from cleberg.net to cmc.pub
Diffstat (limited to 'content/blog/2024-04-08-docker-local-web-server.org')
-rw-r--r--content/blog/2024-04-08-docker-local-web-server.org18
1 files changed, 9 insertions, 9 deletions
diff --git a/content/blog/2024-04-08-docker-local-web-server.org b/content/blog/2024-04-08-docker-local-web-server.org
index f551450..46679c9 100644
--- a/content/blog/2024-04-08-docker-local-web-server.org
+++ b/content/blog/2024-04-08-docker-local-web-server.org
@@ -33,7 +33,7 @@ Open the installer and follow the installation process until the application
finishes the installation process.
#+caption: Docker Desktop on macOS
-[[https://img.cleberg.net/blog/20240408-docker-local-web-server/docker-desktop.png]]
+[[https://img.cmc.pub/blog/20240408-docker-local-web-server/docker-desktop.png]]
** Creating an Nginx Container
@@ -56,7 +56,7 @@ docker run -it --rm -d -p 8000:80 --name web nginx
You can navigate to [[http://localhost:8000]] to see the resulting page.
#+caption: Default Nginx Container
-[[https://img.cleberg.net/blog/20240408-docker-local-web-server/default-container.png]]
+[[https://img.cmc.pub/blog/20240408-docker-local-web-server/default-container.png]]
** Customizing the Nginx Container
@@ -76,7 +76,7 @@ To see the updates, you can delete the previous container in the GUI or run
=docker run= command below.
#+begin_src sh
-docker run -it -d -p 8000:80 --name web -v ~/Source/cleberg.net/.build:/usr/share/nginx/html -v ~/Source/cleberg.net/nginx-config.conf:/etc/nginx/conf.d/default.conf nginx
+docker run -it -d -p 8000:80 --name web -v ~/Source/cmc.pub/.build:/usr/share/nginx/html -v ~/Source/cmc.pub/nginx-config.conf:/etc/nginx/conf.d/default.conf nginx
#+end_src
Here's an example of my development configuration file.
@@ -84,14 +84,14 @@ Here's an example of my development configuration file.
#+begin_src conf
# nginx-config.conf
server {
- server_name cleberg.net www.cleberg.net;
+ server_name cmc.pub www.cmc.pub;
root /usr/share/nginx/html;
index index.html;
autoindex on;
- access_log /var/log/nginx/cleberg.net.access.log;
- error_log /var/log/nginx/cleberg.net.error.log;
+ access_log /var/log/nginx/cmc.pub.access.log;
+ error_log /var/log/nginx/cmc.pub.error.log;
location / {
try_files $uri $uri/ =404;
@@ -102,14 +102,14 @@ server {
}
#+end_src
-[[https://img.cleberg.net/blog/20240408-docker-local-web-server/custom-container.png]]
+[[https://img.cmc.pub/blog/20240408-docker-local-web-server/custom-container.png]]
* Customizing Deployment Actions
I am currently blogging with [[https://emacs.love/weblorg/][weblorg]], which uses a custom =publish.el= file to
build the static site. Within this file, I have configured my deployment process
to check for the =ENV= variable in thesh and if it's set to =prod=, the script
-will set the base URLs to =https://cleberg.net=. If not, it sets the base URLs
+will set the base URLs to =https://cmc.pub=. If not, it sets the base URLs
to =localhost:8000= (which matches the port used in the container above).
Therefore, I have modified my =build.sh= script to build with =localhost= URLs
@@ -123,7 +123,7 @@ if [ "$ENV" == "prod" ]; then
echo "Environment = Production" && \
rm -rf .build/* && \
emacs --script publish.el && \
- scp -r .build/* ubuntu:/var/www/cleberg.net/
+ scp -r .build/* ubuntu:/var/www/cmc.pub/
else
echo "Environment = Development" && \
rm -rf .build/* && \