Skip to content

Commit

Permalink
Refactor docker-compose commands for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWags committed Oct 7, 2024
1 parent ca16e80 commit fe6b30d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/download_upload_cycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
pip install tox
- name: Build images
run: docker-compose build
run: docker compose build
- name: Run migrations
run: docker-compose run --rm django ./manage.py migrate
run: docker compose run --rm django ./manage.py migrate
- name: Create super user
run: docker-compose run -e DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD --rm django ./manage.py createsuperuser --noinput --email=$DJANGO_SUPERUSER_EMAIL
run: docker compose run -e DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD --rm django ./manage.py createsuperuser --noinput --email=$DJANGO_SUPERUSER_EMAIL
- name: Start server
run: docker-compose up -d
run: docker compose up -d

- uses: ifaxity/wait-on-action@v1
with:
Expand All @@ -41,5 +41,5 @@ jobs:
working-directory: ./swcc

- name: Stop server
run: docker-compose down --volumes
run: docker compose down --volumes
if: ${{ always() }}
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
python-version: "3.8"

- name: Build images
run: docker-compose -f "docker-compose.yml" build
run: docker compose -f "docker-compose.yml" build
- name: Install Tox
run: |
docker-compose run --rm django pip install --upgrade pip
docker-compose run --rm django pip install tox
docker compose run --rm django pip install --upgrade pip
docker compose run --rm django pip install tox
- name: Start services
run: docker-compose -f "docker-compose.yml" up -d
run: docker compose -f "docker-compose.yml" up -d

- uses: ifaxity/wait-on-action@v1
with:
resource: 'tcp:localhost:5432 tcp:localhost:5672'
verbose: true

- name: Run tox
run: docker-compose run --rm django tox
run: docker compose run --rm django tox
env:
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
DJANGO_MINIO_STORAGE_ENDPOINT: localhost:9000
Expand All @@ -59,13 +59,13 @@ jobs:
pip install tox
- name: Build images
run: docker-compose build
run: docker compose build
- name: Run migrations
run: docker-compose run --rm django ./manage.py migrate
run: docker compose run --rm django ./manage.py migrate
- name: Create super user
run: docker-compose run -e DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD --rm django ./manage.py createsuperuser --noinput --email=$DJANGO_SUPERUSER_EMAIL
run: docker compose run -e DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD --rm django ./manage.py createsuperuser --noinput --email=$DJANGO_SUPERUSER_EMAIL
- name: Start server
run: docker-compose up -d
run: docker compose up -d

- uses: ifaxity/wait-on-action@v1
with:
Expand All @@ -76,5 +76,5 @@ jobs:
working-directory: ./swcc

- name: Stop server
run: docker-compose down --volumes
run: docker compose down --volumes
if: ${{ always() }}

0 comments on commit fe6b30d

Please sign in to comment.