dev: more docker work #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Container (Docker) | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test Release | |
runs-on: ubuntu-latest | |
steps: | |
- id: setup | |
name: Setup Toolchain | |
uses: docker/setup-buildx-action@v2 | |
- id: build_index | |
name: Build | |
uses: docker/build-push-action@v4 | |
with: | |
push: false | |
load: true | |
target: release | |
tags: torrust-index-backend:release | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
integration: | |
name: Integration | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout_index | |
name: Checkout Repository (Index) | |
uses: actions/checkout@v3 | |
with: | |
path: index | |
- id: checkout_tracker | |
name: Checkout Repository (Tracker) | |
uses: actions/checkout@v3 | |
with: | |
repository: torrust/torrust-tracker | |
path: tracker | |
- id: setup | |
name: Setup Toolchain | |
uses: docker/setup-buildx-action@v2 | |
- id: build_index | |
name: Build Index | |
uses: docker/build-push-action@v4 | |
with: | |
context: index | |
push: false | |
load: true | |
target: debug | |
tags: torrust-index-backend:debug | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- id: build_tracker | |
name: Build Tracker | |
uses: docker/build-push-action@v4 | |
with: | |
context: index | |
push: false | |
load: true | |
target: debug | |
tags: torrust-tracker:debug | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- id: inspect_index | |
name: Inspect Index | |
run: docker image inspect torrust-index-backend:debug | |
- id: inspect_tracker | |
name: Inspect Tracker | |
run: docker image inspect torrust-tracker:debug | |
- id: compose | |
name: Compose Applications | |
run: docker compose build | |
- id: run | |
name: Run Applications | |
run: | | |
export TORRUST_INDEX_CONFIG=$(cat index/config-index.mysql.local.toml) | |
export TORRUST_TRACKER_CONFIG=$(cat index/config-tracker.local.toml) | |
docker compose up --detach | |
- id: check | |
name: Check Applications | |
run: docker ps |