Last active
March 21, 2023 14:14
-
-
Save youcefguichi/084f803982d768de8f5cedad0bac487b 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: node | |
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: | | |
git clone https://github.com/YoucefGuichi/gatspy-site.git && | |
cd gatspy-site && | |
npm install && | |
npm install -g gatsby-cli && | |
gatsby build && | |
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