Skip to content

Commit

Permalink
fix: added ca-certs in consumer and env vars required for gcp (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
abskrj authored Sep 19, 2023
1 parent bf27349 commit 2ab07b1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions configs/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func InitCloud() {
log.Println("Initialised GCP")
return
}

log.Fatalln("Cloud Initialization Failed")
}

func GetCloudSession() *CloudSession {
Expand Down
6 changes: 3 additions & 3 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const WRITE_TIMEOUT = 5 * time.Second
const IDLE_TIMEOUT = 30 * time.Second

// folders
const DOWNLOAD_FILE_PATH_PREFIX = "downloads"
const OUTPUT_FILE_PATH_PREFIX = "output"
const CLOUD_CONTAINER_NAME = "zestream-dash"
const DOWNLOAD_FILE_PATH_PREFIX = "assets/downloads"
const OUTPUT_FILE_PATH_PREFIX = "assets/output"
const CLOUD_CONTAINER_NAME = "dashes"
const DOWNLOAD_FOLDER_PERM = 0666

const AWS_ENDPOINT = "http://localhost:4566"
Expand Down
4 changes: 3 additions & 1 deletion consumer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ WORKDIR /app
COPY --from=builder /app/main ./
COPY --from=builder /app/credentials.json ./

RUN apt update
RUN apt update
RUN apt install -y ca-certificates
RUN update-ca-certificates
RUN apt install -y ffmpeg
RUN apt install -y gpac

Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ services:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
- GCP_BUCKET_NAME=${GCP_BUCKET_NAME}
- GCP_PROJECT_ID=${GCP_PROJECT_ID}
ports:
- "8080:${PORT}"
container_name: go-app-http-container
Expand All @@ -33,8 +35,10 @@ services:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
- GCP_BUCKET_NAME=${GCP_BUCKET_NAME}
- GCP_PROJECT_ID=${GCP_PROJECT_ID}
volumes:
- consumer-data:/app
- consumer-data:/app/assets

volumes:
consumer-data:
1 change: 0 additions & 1 deletion service/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func VideoProcessConsumer(ch *rmq.Channel, q *rmq.Queue) {
continue
}

log.Println("Request Consumed: ", video)
go processVideo(&video, guard)
}
}()
Expand Down

0 comments on commit 2ab07b1

Please sign in to comment.