Files
Palmr/composes/docker-compose-base.yaml
Daniel Luiz Alves 44ce5b1f37 refactor(file-handling): replace multer with fastify multipart for file uploads
This commit removes the dependency on multer and replaces it with fastify's built-in multipart handling for file uploads. The changes include:
- Removing multer and related dependencies from package.json.
- Refactoring logo and avatar services to handle base64 encoded images directly.
- Updating docker-compose configurations to reflect changes in file storage.
- Adding new documentation for file upload processes.

The refactor simplifies the file upload process, reduces dependencies, and improves maintainability.
2025-03-31 17:24:22 -03:00

104 lines
2.7 KiB
YAML

services:
palmr-api:
image: kyantech/palmr-api:latest
container_name: palmr-api
depends_on:
postgres:
condition: "service_healthy"
minio:
condition: "service_healthy"
environment:
- PORT=3333
- DATABASE_URL=postgresql://postgres:{{DB_PASSWORD}}@postgres:5432/palmr_db?schema=public
- MINIO_ENDPOINT=minio
- MINIO_PORT=9000
- MINIO_USE_SSL=false
- MINIO_ROOT_USER={{MINIO_ROOT_USER}}
- MINIO_ROOT_PASSWORD={{MINIO_ROOT_PASSWORD}}
- MINIO_REGION=sa-east-1
- MINIO_BUCKET_NAME=files
- FRONTEND_URL=http://localhost:4173
- BASE_URL=http://localhost:3333
ports:
- "3333:3333"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3333/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
palmr-app:
image: kyantech/palmr-app:latest
container_name: palmr-web
ports:
- "4173:4173"
depends_on:
palmr-api:
condition: "service_healthy"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4173"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
minio:
image: minio/minio:RELEASE.2025-03-12T18-04-18Z
container_name: minio
environment:
- MINIO_ROOT_USER={{MINIO_ROOT_USER}}
- MINIO_ROOT_PASSWORD={{MINIO_ROOT_PASSWORD}}
- MINIO_SITE_REGION=sa-east-1
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"]
interval: 10s
timeout: 5s
retries: 5
minio-init:
image: minio/mc:RELEASE.2025-03-12T17-29-24Z
container_name: minio-init
depends_on:
minio:
condition: "service_healthy"
restart: "no"
entrypoint: >
sh -c "
sleep 5 &&
mc alias set myminio http://minio:9000 {{MINIO_ROOT_USER}} {{MINIO_ROOT_PASSWORD}} &&
mc mb myminio/files --ignore-existing &&
mc anonymous set download myminio/files
"
postgres:
image: bitnami/postgresql:17.2.0
container_name: palmr-postgres
environment:
- POSTGRESQL_USERNAME=postgres
- POSTGRESQL_PASSWORD={{DB_PASSWORD}}
- POSTGRESQL_DATABASE=palmr_db
volumes:
- postgres_data:/bitnami/postgresql
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "palmr"]
interval: 10s
timeout: 5s
retries: 5
volumes:
minio_data:
postgres_data: