Skip to content

Commit

Permalink
Merge pull request #218 from panoratech/pnr-object-storage
Browse files Browse the repository at this point in the history
Pnr object storage
  • Loading branch information
rflihxyz authored Jan 4, 2024
2 parents eb1b3b1 + f3a5905 commit d24b020
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 115 deletions.
12 changes: 8 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ ZENDESK_TICKETING_CLIENT_SECRET=
VITE_BACKEND_DOMAIN=http://localhost:3000
VITE_FRONTEND_DOMAIN=http://localhost:81

# Minio (s3 storage)
# # # # # # # # # # # #
# Minio (s3 storage) #
# # # # # # # # # # # #
MINIO_ROOT_USER=myaccesskey13
MINIO_ROOT_PASSWORD=mysecretkey12

## S3 Buckets
AWS_S3_REGION=us-east-1
# S3 Buckets
# Ticketing Attachments bucket
S3_TCG_ATTACHMENTS_BUCKETNAME=tcg-attachments
S3_TCG_ATTACHMENTS_BUCKETNAME=tcg-attachments
BUCKET_TCG_ATTACHMENTS_USER=BUCKET_TCG_ATTACHMENTS_USER01
BUCKET_TCG_ATTACHMENTS_PW=BUCKET_TCG_ATTACHMENTS_PW01
18 changes: 11 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,11 @@ services:
- "9001:9001"
command: server /data --console-address ":9001"
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:9000/minio/health/live'
retries: 5
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1
start_period: 5s
interval: 10s
timeout: 5s
retries: 2
volumes:
- pnr-objstr:/data
restart:
Expand All @@ -118,12 +115,19 @@ services:
entrypoint: []
command: >
sh -c "
sleep 10 &&
mc alias set panora-store http://panora-store:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} &&
echo "****1****" &&
mc mb panora-store/${S3_TCG_ATTACHMENTS_BUCKETNAME} &&
echo "****2****" &&
mc admin user add panora-store ${BUCKET_TCG_ATTACHMENTS_USER} ${BUCKET_TCG_ATTACHMENTS_PW} &&
echo "****3****" &&
mc admin policy attach panora-store readwrite --user ${BUCKET_TCG_ATTACHMENTS_USER} &&
echo "****4****" &&
mc ls panora-store
"
depends_on:
- panora-store
- postgres
volumes:
- pnr-objstr:/data

Expand Down
Loading

0 comments on commit d24b020

Please sign in to comment.