Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,3 @@ jobs:

- name: Build containers
run: make build-and-push -e BUILD_TAG=${BUILD_TAG}

- name: Set up wireguard tunnel configuration
run: |
sudo apt install wireguard resolvconf
echo '${{ secrets.WIRE_CONFIG }}' | sudo tee -a /etc/wireguard/tunnel.conf > /dev/null

- name: Open wireguard tunnel
run: sudo wg-quick up tunnel

- name: Export kubeconfig
run: |
mkdir -p ~/.kube/
echo '${{ secrets.KUBE_CONFIG }}' > ~/.kube/config
kubectl get pods --namespace=${{ secrets.KUBE_NS }}

- name: Deploy application
run: make deploy -e BUILD_TAG=${BUILD_TAG}

- name: Wait for deployment success
run: kubectl rollout status deployment ${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}

- name: Check website is responding correctly, or rollback
run: |
set +e
curl --fail -sSL -D - ${{ env.TEST_URL }} -o /dev/null

if [[ "$?" != 0 ]]; then
echo "Website is not properly online, rolling back"
kubectl rollout undo deployment.v1.apps/${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}
kubectl rollout status deployment ${{ secrets.KUBE_DEPLOYMENT }} --namespace=${{ secrets.KUBE_NS }}
exit 1
fi

set -e

- name: Disconnect from tunnel
if: always()
run: wg-quick down tunnel
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ WORKDIR /application
COPY infrastructure/nginx/nginx.conf /etc/nginx/conf.d/default.conf

# NGINX config: update php-fpm hostname to localhost (same pod in k8s), activate pagespeed config, deactivate SSL
RUN sed -i "s/php-fpm/localhost/g" /etc/nginx/conf.d/default.conf \
&& sed -i "s/# %DEPLOYMENT //g" /etc/nginx/conf.d/default.conf \
RUN sed -i "s/# %DEPLOYMENT //g" /etc/nginx/conf.d/default.conf \
&& sed -i "s/listen 443/#listen 443/g" /etc/nginx/conf.d/default.conf \
&& sed -i "s/ssl_/#ssl_/g" /etc/nginx/conf.d/default.conf

Expand Down
164 changes: 0 additions & 164 deletions infrastructure/kubernetes/deployment.yaml

This file was deleted.

Loading