Skip to content

Commit

Permalink
🚀 S3 compatible store for ticketing-attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachid F committed Jan 4, 2024
1 parent 2a39086 commit d5614b8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,12 @@ ZENDESK_TICKETING_CLIENT_SECRET=
# Webapp settings
# Must be set in the perspective of the end user browser
VITE_BACKEND_DOMAIN=http://localhost:3000
VITE_FRONTEND_DOMAIN=http://localhost:81
VITE_FRONTEND_DOMAIN=http://localhost:81

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

## S3 Buckets
# Ticketing Attachments bucket
S3_TCG_ATTACHMENTS_BUCKETNAME=tcg-attachments
2 changes: 1 addition & 1 deletion apps/frontend-snippet/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
place-items: center;
min-width: 320px;
min-height: 100vh;
font-family: "IBM Plex Mono", monospace;
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}

button {
Expand Down
50 changes: 46 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: panora
version: '3.8'

networks:
frontend:
backend:

services:
postgres:
image: postgres:16.1
Expand Down Expand Up @@ -91,3 +87,49 @@ services:
networks:
- backend
- frontend

panora-store:
image: minio/minio
container_name: panora-store
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
ports:
- "9000:9000"
- "9001:9001"
command: server /data --console-address ":9001"
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:9000/minio/health/live'
retries: 5
interval: 10s
timeout: 5s
volumes:
- pnr-objstr:/data
restart:
unless-stopped

# Initialize s3 buckets
panora-store-init:
image: minio/minio
entrypoint: []
command: >
sh -c "
mc alias set panora-store http://panora-store:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} &&
mc mb panora-store/${S3_TCG_ATTACHMENTS_BUCKETNAME} &&
mc ls panora-store
"
depends_on:
- panora-store
volumes:
- pnr-objstr:/data

networks:
frontend:
backend:

volumes:
pnr-objstr:

0 comments on commit d5614b8

Please sign in to comment.