File tree Expand file tree Collapse file tree 3 files changed +1
-204
lines changed
infrastructure/kubernetes Expand file tree Collapse file tree 3 files changed +1
-204
lines changed Original file line number Diff line number Diff line change 5050
5151 - name : Build containers
5252 run : make build-and-push -e BUILD_TAG=${BUILD_TAG}
53-
54- - name : Set up wireguard tunnel configuration
55- run : |
56- sudo apt install wireguard resolvconf
57- echo '${{ secrets.WIRE_CONFIG }}' | sudo tee -a /etc/wireguard/tunnel.conf > /dev/null
58-
59- - name : Open wireguard tunnel
60- run : sudo wg-quick up tunnel
61-
62- - name : Export kubeconfig
63- run : |
64- mkdir -p ~/.kube/
65- echo '${{ secrets.KUBE_CONFIG }}' > ~/.kube/config
66- kubectl get pods --namespace=${{ secrets.KUBE_NS }}
67-
68- - name : Deploy application
69- run : make deploy -e BUILD_TAG=${BUILD_TAG}
70-
71- - name : Wait for deployment success
72- run : kubectl rollout status deployment ${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}
73-
74- - name : Check website is responding correctly, or rollback
75- run : |
76- set +e
77- curl --fail -sSL -D - ${{ env.TEST_URL }} -o /dev/null
78-
79- if [[ "$?" != 0 ]]; then
80- echo "Website is not properly online, rolling back"
81- kubectl rollout undo deployment.v1.apps/${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}
82- kubectl rollout status deployment ${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}
83- exit 1
84- fi
85-
86- set -e
87-
88- - name : Disconnect from tunnel
89- if : always()
90- run : wg-quick down tunnel
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ WORKDIR /application
7979COPY infrastructure/nginx/nginx.conf /etc/nginx/conf.d/default.conf
8080
8181# NGINX config: update php-fpm hostname to localhost (same pod in k8s), activate pagespeed config, deactivate SSL
82- RUN sed -i "s/php-fpm/localhost/g" /etc/nginx/conf.d/default.conf \
83- && sed -i "s/# %DEPLOYMENT //g" /etc/nginx/conf.d/default.conf \
82+ RUN sed -i "s/# %DEPLOYMENT //g" /etc/nginx/conf.d/default.conf \
8483 && sed -i "s/listen 443/#listen 443/g" /etc/nginx/conf.d/default.conf \
8584 && sed -i "s/ssl_/#ssl_/g" /etc/nginx/conf.d/default.conf
8685
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments