Skip to content

Commit

Permalink
fix(docker): remove env var ANSIBLE_CONFIG and move ansible.cfg to /e…
Browse files Browse the repository at this point in the history
…tc/ansible/ansible.cfg
  • Loading branch information
fiftin committed Jul 4, 2024
1 parent dd8bb73 commit 540b097
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deployment/docker/debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down
2 changes: 0 additions & 2 deletions deployment/docker/debug/server-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 0 additions & 1 deletion deployment/docker/runner/runner-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 0 additions & 1 deletion deployment/docker/server/server-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 540b097

Please sign in to comment.