mirror of
https://github.com/ublue-os/forge.git
synced 2025-04-18 20:43:43 +03:00
fix: make sure container get's stopped once job is done
This commit is contained in:
parent
83379a0d72
commit
882340fa5c
|
@ -5,7 +5,7 @@ kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: ublue-os_forge
|
name: ublue-os_forge
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Always
|
restartPolicy: OnFailure
|
||||||
volumes:
|
volumes:
|
||||||
- name: ublue-os_forge-certs-pvc
|
- name: ublue-os_forge-certs-pvc
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
@ -74,6 +74,11 @@ spec:
|
||||||
subPath: ssh
|
subPath: ssh
|
||||||
name: ublue-os_forge-certs-pvc
|
name: ublue-os_forge-certs-pvc
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
workingDir: /ansible
|
||||||
|
command:
|
||||||
|
- ansible-playbook
|
||||||
|
args:
|
||||||
|
- main.yml
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
# Source Image
|
# Source Image
|
||||||
FROM docker.io/library/python:alpine3.17
|
FROM docker.io/library/python:alpine3.17
|
||||||
|
|
||||||
# Install ansible setup project
|
# Install ansible and dependencies
|
||||||
WORKDIR /ansible
|
WORKDIR /ansible
|
||||||
COPY ./ansible .
|
COPY ./ansible .
|
||||||
RUN pip3 install -r ./requirements.txt
|
RUN pip3 install -r ./requirements.txt
|
||||||
RUN chmod +x ./startup.sh
|
|
||||||
|
|
||||||
# Container start command
|
|
||||||
CMD ["/ansible/startup.sh"]
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Run setup only once
|
|
||||||
if [ ! -f /ansible/.startup-done ]; then
|
|
||||||
ansible-playbook main.yml
|
|
||||||
touch /ansible/.startup-done
|
|
||||||
fi
|
|
Loading…
Reference in a new issue