fix(docker): remove env var ANSIBLE_CONFIG and move ansible.cfg to /etc/ansible/ansible.cfg

This commit is contained in:
fiftin 2024-07-04 15:40:29 +05:00
parent dd8bb7364a
commit 540b097fe6
No known key found for this signature in database
GPG Key ID: 044381366A5D4731
6 changed files with 3 additions and 7 deletions

View File

@ -40,7 +40,7 @@ bash curl git gnupg mysql-client openssh-client-default python3 python3-dev py3-
chown -R semaphore:0 /var/lib/semaphore && \
chown -R semaphore:0 /opt/semaphore
COPY --chown=1001:0 ./deployment/docker/debug/ansible.cfg /tmp/semaphore/ansible.cfg
COPY --chown=1001:0 ./deployment/docker/debug/ansible.cfg /etc/ansible/ansible.cfg
COPY --from=builder /go/src/semaphore/deployment/docker/debug/server-wrapper /usr/local/bin/
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/
COPY --from=builder /go/bin/dlv /

View File

@ -32,8 +32,6 @@ file_env() {
}
export SEMAPHORE_CONFIG_PATH="${SEMAPHORE_CONFIG_PATH:-/etc/semaphore}"
export ANSIBLE_CONFIG="${ANSIBLE_CONFIG:-${SEMAPHORE_TMP_PATH}/ansible.cfg}"
export SEMAPHORE_TMP_PATH="${SEMAPHORE_TMP_PATH:-/tmp/semaphore}"
export SEMAPHORE_DB_DIALECT="${SEMAPHORE_DB_DIALECT:-mysql}"
export SEMAPHORE_DB_HOST="${SEMAPHORE_DB_HOST:-0.0.0.0}"

View File

@ -63,7 +63,7 @@ RUN apk add --no-cache -U \
chown -R semaphore:0 /opt/semaphore && \
find /usr/lib/python* -iname __pycache__ | xargs rm -rf
COPY --chown=1001:0 ./deployment/docker/runner/ansible.cfg /tmp/semaphore/ansible.cfg
COPY --chown=1001:0 ./deployment/docker/runner/ansible.cfg /etc/ansible/ansible.cfg
COPY --from=builder /go/src/semaphore/deployment/docker/runner/runner-wrapper /usr/local/bin/
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/
COPY --from=builder /tmp/tofu /usr/local/bin/

View File

@ -4,7 +4,6 @@ echoerr() { printf "%s\n" "$*" >&2; }
export SEMAPHORE_CONFIG_PATH="${SEMAPHORE_CONFIG_PATH:-/etc/semaphore}"
export SEMAPHORE_TMP_PATH="${SEMAPHORE_TMP_PATH:-/tmp/semaphore}"
export ANSIBLE_CONFIG="${ANSIBLE_CONFIG:-${SEMAPHORE_TMP_PATH}/ansible.cfg}"
if test -f "${SEMAPHORE_CONFIG_PATH}/packages.txt"; then
echoerr "Installing additional system dependencies"

View File

@ -66,7 +66,7 @@ RUN apk add --no-cache -U \
chown -R semaphore:0 /opt/semaphore && \
find /usr/lib/python* -iname __pycache__ | xargs rm -rf
COPY --chown=1001:0 ./deployment/docker/server/ansible.cfg /tmp/semaphore/ansible.cfg
COPY --chown=1001:0 ./deployment/docker/server/ansible.cfg /etc/ansible/ansible.cfg
COPY --from=builder /go/src/semaphore/deployment/docker/server/server-wrapper /usr/local/bin/
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/
COPY --from=builder /tmp/tofu /usr/local/bin/

View File

@ -33,7 +33,6 @@ file_env() {
export SEMAPHORE_CONFIG_PATH="${SEMAPHORE_CONFIG_PATH:-/etc/semaphore}"
export SEMAPHORE_TMP_PATH="${SEMAPHORE_TMP_PATH:-/tmp/semaphore}"
export ANSIBLE_CONFIG="${ANSIBLE_CONFIG:-${SEMAPHORE_TMP_PATH}/ansible.cfg}"
export SEMAPHORE_DB_DIALECT="${SEMAPHORE_DB_DIALECT:-mysql}"
export SEMAPHORE_DB_HOST="${SEMAPHORE_DB_HOST:-0.0.0.0}"
export SEMAPHORE_DB_PATH="${SEMAPHORE_DB_PATH:-/var/lib/semaphore}"