Skip to content

Commit

Permalink
Optimize docker files layout
Browse files Browse the repository at this point in the history
  • Loading branch information
anbsky committed Feb 19, 2024
1 parent 7c244e3 commit a48a9f3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 32 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: 'doco'
fetch-depth: 0
- run: |
cd doco &&
docker-compose up -d minio db redis &&
docker-compose up -d cworker conductor &&
docker-compose up minio-prepare
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v3
Expand All @@ -24,4 +33,4 @@ jobs:
uses: FedericoCarboni/setup-ffmpeg@v1-beta
id: setup-ffmpeg
- name: Run tests
run: make test
run: go test -covermode=count -coverprofile=coverage.out ./...
25 changes: 0 additions & 25 deletions Dockerfile.test

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ transcoder: $(BUILD_DIR)/$(GOOS)_$(GOARCH)/transcoder
./pkg/conductor/cmd/

conductor_image:
docker buildx build -f Dockerfile-conductor -t odyseeteam/transcoder-conductor:$(TRANSCODER_VERSION) --platform linux/amd64 .
docker buildx build -f docker/Dockerfile-conductor -t odyseeteam/transcoder-conductor:$(TRANSCODER_VERSION) --platform linux/amd64 .

cworker_image:
docker buildx build -f Dockerfile-cworker -t odyseeteam/transcoder-cworker:$(TRANSCODER_VERSION) --platform linux/amd64 .
docker buildx build -f docker/Dockerfile-cworker -t odyseeteam/transcoder-cworker:$(TRANSCODER_VERSION) --platform linux/amd64 .

test_down:
docker-compose down
Expand All @@ -30,7 +30,7 @@ test_prepare:
docker-compose up minio-prepare

test: test_prepare
go test -exclude="docker-data" -covermode=count -coverprofile=coverage.out ./...
go test -covermode=count -coverprofile=coverage.out ./...

towerz:
docker run --rm -v "$(PWD)":/usr/src/transcoder -w /usr/src/transcoder --platform linux/amd64 golang:1.16.10 make tower
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- "8080:8080"
# build:
# context: .
# dockerfile: Dockerfile-tower
# dockerfile: docker/Dockerfile-tower
depends_on:
- redis
- db
Expand All @@ -35,7 +35,7 @@ services:
- --blob-server=blobcache-eu.lbry.com
# build:
# context: .
# dockerfile: Dockerfile-worker
# dockerfile: docker/Dockerfile-worker
depends_on: ["redis"]
volumes:
- ${PWD}/worker.ex.yml:/app/worker.yml
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a48a9f3

Please sign in to comment.