Skip to content

Commit

Permalink
feat: Include s3 dep
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Jan 10, 2024
1 parent 6a662b4 commit 1158232
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
REDIS_HOST=localhost
REDIS_PORT=6379
MOSAICS_API_URL=http://localhost:3000/tasks.json
S3_ENDPOINT=localhost:9000
S3_ACCESS_KEY_ID=mosaic
S3_SECRET_ACCESS_KEY=mosaic#123
S3_BUCKET_NAME=mosaic
3 changes: 0 additions & 3 deletions cmd/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/mauricioabreu/mosaic-video/internal/config"
"github.com/mauricioabreu/mosaic-video/internal/locking"
"github.com/mauricioabreu/mosaic-video/internal/logging"
"github.com/mauricioabreu/mosaic-video/internal/uploader"
"github.com/mauricioabreu/mosaic-video/internal/worker"
"github.com/spf13/cobra"
"go.uber.org/fx"
Expand All @@ -24,12 +23,10 @@ func Work() *cobra.Command {

app := fx.New(
config.Module,
uploader.Module,
fx.Provide(
logging.NewLogger,
locking.NewRedisLocker,
),
fx.Invoke(uploader.Run),
fx.Invoke(worker.Run),
)

Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ services:
init: true # make server PID 1
environment:
- PYTHONUNBUFFERED=True
storage:
image: quay.io/minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- s3_storage:/data
environment:
- MINIO_ROOT_USER=mosaic
- MINIO_ROOT_PASSWORD=mosaic#123
command: server --console-address ":9001" /data

volumes:
s3_storage: {}

0 comments on commit 1158232

Please sign in to comment.