-
-
Save youcefguichi/fd5fea96cd86865e441cf71986f876b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: initcon | |
name: initcon | |
spec: | |
volumes: | |
- name: static-files | |
emptyDir: {} | |
- name: hugo-configuration | |
configMap: | |
name: hugo | |
initContainers: | |
- name: init-con | |
image: golang | |
volumeMounts: | |
- mountPath: /hugo.conf | |
name: hugo-configuration | |
- mountPath: /usr/share/nginx/html | |
name: static-files | |
command: | |
- sh | |
- -c | |
args: | |
- >- | |
cp /hugo.conf/setup_hugo.sh / && cd / && | |
chmod +x setup_hugo.sh && ./setup_hugo.sh | |
containers: | |
- image: nginx:alpine | |
name: main | |
resources: {} | |
volumeMounts: | |
- mountPath: /usr/share/nginx/html | |
name: static-files | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
status: {} | |
--- | |
apiVersion: v1 | |
data: | |
setup_hugo.sh: | | |
wget https://github.com/gohugoio/hugo/releases/download/v0.111.3/hugo_0.111.3_Linux-64bit.tar.gz && | |
tar -xzf hugo_0.111.3_Linux-64bit.tar.gz && | |
chmod +x hugo && | |
mv hugo /usr/local/bin && cd / && pwd && | |
git clone https://github.com/YoucefGuichi/hugo-site.git && | |
cd hugo-site && hugo && | |
mkdir -p /usr/share/nginx/html && | |
cp -r ./public/. /usr/share/nginx/html | |
kind: ConfigMap | |
metadata: | |
name: hugo | |
namespace: default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment