Skip to content

Commit

Permalink
ci: docker workflow work
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Aug 3, 2023
1 parent 28013a1 commit 645f9ed
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 34 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Container

on:
push:
pull_request:

jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3

- id: setup
name: Setup Toolchain
uses: docker/setup-buildx-action@v2

- id: build
name: Build
uses: docker/build-push-action@v4
with:
context: .
load: true
push: false
tags: index-backend:local
cache-from: type=gha
cache-to: type=gha,mode=max

- id: inspect
name: Inspect
run: docker image inspect index-backend:local

- name: Build docker-compose images
run: docker compose build
26 changes: 0 additions & 26 deletions .github/workflows/test_docker.yml

This file was deleted.

11 changes: 3 additions & 8 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ name: torrust
services:

idx-back:
build:
context: .
args:
RUN_AS_USER: appuser
UID: ${TORRUST_IDX_BACK_USER_UID:-1000}
target: development
image: index-backend:local
user: ${TORRUST_IDX_BACK_USER_UID:-1000}:${TORRUST_IDX_BACK_USER_UID:-1000}
tty: true
environment:
- TORRUST_IDX_BACK_CONFIG=${TORRUST_IDX_BACK_CONFIG}
- TORRUST_IDX_BACK_CORS_PERMISSIVE=true
- CARGO_HOME=/home/appuser/.cargo
networks:
- server_side
Expand All @@ -29,8 +25,7 @@ services:
# start_period: 10s
# timeout: 3s
volumes:
- ./:/app
- ~/.cargo:/home/appuser/.cargo
- ./storage:/app/storage
depends_on:
- tracker
- mailcatcher
Expand Down
2 changes: 2 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ bencoded
Benoit
binascii
btih
buildcache
buildx
chrono
clippy
codecov
Expand Down

0 comments on commit 645f9ed

Please sign in to comment.