Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write build context to a build directory instead of using birdhouse/ #362

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions birdhouse/pavics-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ if [ x"$1" = x"up" ]; then
echo ${COMPOSE_CONF_LIST} | tr ' ' '\n' | grep -v '^-f'

# the PROXY_SECURE_PORT is a little trick to make the compose file invalid without the usage of this wrapper script
PROXY_SECURE_PORT=443 HOSTNAME=${PAVICS_FQDN} docker-compose --project-directory "${BUILD_DIR}" ${COMPOSE_CONF_LIST} config -o "${COMPOSE_FILE}"
PROXY_SECURE_PORT=443 HOSTNAME=${PAVICS_FQDN} docker compose --project-directory "${BUILD_DIR}" ${COMPOSE_CONF_LIST} config -o "${COMPOSE_FILE}"
fmigneault marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to keep the old docker-compose, otherwise it won't work in the autodeploy container. Or you'll have to update the autodeploy container and ensure all existing deployments are up-to-date as well.

Or make pavics-compose.sh not rely on the locally installed docker-compose but use the same image as the autodeploy. This will also allow catching incompatibility bugs earlier than having to trigger autodeploy to catch the bug.

I think this docker upgrade should be in separate PR to not burden this one. So just keep docker-compose for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fi

docker-compose -f "${COMPOSE_FILE}" "$@"
docker compose -f "${COMPOSE_FILE}" "$@"
ERR=$?

# execute post-compose function if exists and no error occurred
Expand All @@ -148,11 +148,11 @@ while [ $# -gt 0 ]
do
if [ x"$1" = x"up" ]; then
# we restart the proxy after an up to make sure nginx continue to work if any container IP address changes
docker-compose -f "${COMPOSE_FILE}" restart proxy
docker compose -f "${COMPOSE_FILE}" restart proxy

# run postgres post-startup setup script
# Note: this must run before the post-docker-compose-up scripts since some may expect postgres databases to exist
postgres_id=$(docker-compose -f "${COMPOSE_FILE}" ps -q postgres)
postgres_id=$(docker compose -f "${COMPOSE_FILE}" ps -q postgres)
if [ ! -z "$postgres_id" ]; then
docker exec ${postgres_id} /postgres-setup.sh
fi
Expand Down