Skip to content

Commit ae18a2c

Browse files
authored
Merge pull request #379 from phpdocker-io/new-deployment
Bye bye kubernetes
2 parents e51338c + 79256f1 commit ae18a2c

File tree

3 files changed

+1
-204
lines changed

3 files changed

+1
-204
lines changed

.github/workflows/deploy.yaml renamed to .github/workflows/build-containers.yaml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,41 +50,3 @@ jobs:
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

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ WORKDIR /application
7979
COPY 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

infrastructure/kubernetes/deployment.yaml

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)