Skip to content

Commit

Permalink
changing docker-compose to use postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
tigranbs committed Oct 18, 2023
1 parent fb243f4 commit 79af6bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c *ProjectConfigType) Init() {
c.DatabaseUrl = GetEnv("DATABASE_URL", "file::memory:?cache=shared")

// Storage Backend
c.Storage.ActiveBackend = GetEnv("STORAGE_BACKEND", StorageS3)
c.Storage.ActiveBackend = GetEnv("STORAGE_BACKEND", StorageFileSystem)

// S3 Storage Config
c.Storage.S3.Region = GetEnv("S3_REGION", "us-east-1")
Expand Down
14 changes: 12 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ services:
restart: always
environment:
LISTEN_ADDRESS: ":8080"
DATABASE_URL: "packages.sqlite"

DATABASE_URL: "postgres://postgres:postgres@postgres:5432/pkgstore?sslmode=disable"
STORAGE_BACKEND: "s3"
S3_BUCKET: "pkgstore"
S3_API_HOST: "http://minio:9000"
S3_API_KEY: "minioadmin"
S3_API_SECRET: "minioadmin"
ports:
- "8080:8080"

minio:
image: quay.io/minio/minio:latest
restart: always
Expand All @@ -23,3 +24,12 @@ services:
ports:
- "127.0.0.1:9090:9090"
- "127.0.0.1:9000:9000"

postgres:
image: postgres:alpine
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: pkgstore

0 comments on commit 79af6bb

Please sign in to comment.