Skip to content

Commit

Permalink
move gitup actions etc to use docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Aug 13, 2024
1 parent b7ce205 commit 4ef717c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cached-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ runs:
- name: Build and tag relevant app from docker-compose
shell: bash
run: |
docker-compose -f ${{ inputs.docker_compose_file }} build ${{ inputs.docker_compose_file_app }}
docker compose -f ${{ inputs.docker_compose_file }} build ${{ inputs.docker_compose_file_app }}
docker tag "$IMAGE_NAME" "$REGISTRY/$IMAGE_NAME"
for val in $TAGS; do
docker tag "$IMAGE_NAME" "$val"
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/in-container/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
description: 'shell to run command on inside docker'
default: 'bash --noprofile --norc -eo pipefail'
app:
description: 'docker-compose app to run command in'
description: 'docker compose app to run command in'
required: true
default: 'web'
use_dev_image:
Expand All @@ -19,7 +19,7 @@ runs:
using: "composite"

steps:
- name: Build image from docker-compose
- name: Build image from docker compose
if: ${{ inputs.use_dev_image == 'false' }}
uses: ./.github/actions/cached-build
with:
Expand All @@ -35,7 +35,7 @@ runs:
composeFiles="-f docker-compose.yml"
fi
shellCommands='$@'
echo "docker-compose $composeFiles run --volume /home/runner:/home/runner/ ${{ inputs.app }} ${{ inputs.shell }} $shellCommands" > ${{ github.action_path }}/docker_command.sh
echo "docker compose $composeFiles run --volume /home/runner:/home/runner/ ${{ inputs.app }} ${{ inputs.shell }} $shellCommands" > ${{ github.action_path }}/docker_command.sh
echo "${{ github.action_path }}" >> $GITHUB_PATH
env:
USE_DEV_IMAGE: ${{ inputs.use_dev_image}}
Expand Down
2 changes: 1 addition & 1 deletion script/dev-command
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "$INSIDE_DOCKER" == 1 ] ; then
elif [ "$DEVENV" == "docker" ] ; then
# not inside container but should be :-(
# run the command inside the container
PREFIX="docker-compose exec web"
PREFIX="docker compose exec web"
else
# not inside container and don’t need to be :-)
# run command in virtualenv with poetry
Expand Down
4 changes: 2 additions & 2 deletions script/server
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ case "$ACTION" in
source .env
if [ "$DEVENV" == "docker" ] ; then
echo "==> Removing any stopped or crashed containers..."
docker-compose rm
docker compose rm
echo "==> Removing node_modules volume if present..."
docker volume rm noiseworks_node_modules || true
echo "==> Starting development environment, hit ^C to stop..."
docker-compose up
docker compose up
else
echo "==> Starting development server..."
script/server --development
Expand Down

0 comments on commit 4ef717c

Please sign in to comment.