Dockerized the website
This commit is contained in:
parent
0bf6b72d5f
commit
209ee46444
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
./public
|
||||
./.packages
|
||||
./.git
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.packages/
|
||||
public/
|
||||
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM nginx:alpine
|
||||
LABEL maintainer="Roger Gonzalez <roger@rogs.me>"
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
RUN rm /usr/share/nginx/html/* && \
|
||||
apk add --no-cache emacs git && \
|
||||
emacs -Q --script build-site.el && \
|
||||
cp -R ./public/* /usr/share/nginx/html && \
|
||||
apk del emacs git
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# Start Nginx and keep it running in the foreground
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
19
README.org
19
README.org
@ -28,6 +28,25 @@ Now, run ~./build.sh~:
|
||||
Go to ./content/menu.org and run the code block. On the "RESULTS" section, remove the ~:~ at the begining
|
||||
of the result.
|
||||
|
||||
* Deploy
|
||||
:PROPERTIES:
|
||||
:ID: 2986441f-1d14-4dcd-9282-9c7aa194a6e8
|
||||
:END:
|
||||
This package is self deployable, ready to run behind a proxy (like NGINX Proxy Manager)
|
||||
|
||||
Make sure you have Emacs installed on the destination server.
|
||||
|
||||
First, make ~deploy.sh~ an executable:
|
||||
#+begin_src bash
|
||||
chmod +x deploy.sh
|
||||
#+end_src
|
||||
|
||||
Now run ~./deploy.sh~:
|
||||
#+begin_src bash
|
||||
NAME="org-wiki" PORT=8080 ./deploy.sh
|
||||
#+end_src
|
||||
|
||||
|
||||
* License
|
||||
:PROPERTIES:
|
||||
:ID: 847b2c69-f711-4bde-b75c-c95a8d9cba9e
|
||||
|
@ -1,5 +1,5 @@
|
||||
#+title: Org Mode Wiki site
|
||||
#+INCLUDE: "~/code/personal/org-web-wiki-template/content/menu.org"
|
||||
#+INCLUDE: "./menu.org"
|
||||
|
||||
* Overview
|
||||
:PROPERTIES:
|
||||
|
@ -1,5 +1,5 @@
|
||||
#+title: Another section
|
||||
#+INCLUDE: "~/code/personal/org-web-wiki-template/content/menu.org"
|
||||
#+INCLUDE: "../menu.org"
|
||||
|
||||
This is another section
|
||||
|
||||
|
8
deploy.sh
Executable file
8
deploy.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
docker rm "$NAME" --force
|
||||
|
||||
docker image rm "$NAME"
|
||||
|
||||
docker build -t "$NAME" .
|
||||
|
||||
docker run --name "$NAME" -d -p "$PORT":80 "$NAME"
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user