feat: update composes

This commit is contained in:
Daniel Luiz Alves
2025-03-14 13:14:51 -03:00
parent 168eae3294
commit 3002c26fac
2 changed files with 23 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
services: services:
api: palmr-api:
build: ./apps/server build: ./apps/server
container_name: palmr-api container_name: palmr-api
depends_on: depends_on:
@@ -19,9 +19,12 @@ services:
- MINIO_BUCKET_NAME=files - MINIO_BUCKET_NAME=files
- FRONTEND_URL=http://localhost:4173 - FRONTEND_URL=http://localhost:4173
- MINIO_PUBLIC_URL=http://localhost:9000 - MINIO_PUBLIC_URL=http://localhost:9000
- BASE_URL=http://localhost:3333
ports: ports:
- "3333:3333" - "3333:3333"
restart: unless-stopped restart: unless-stopped
volumes:
- palmr_uploads:/app/uploads
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3333/health"] test: ["CMD", "curl", "-f", "http://localhost:3333/health"]
interval: 10s interval: 10s
@@ -29,7 +32,7 @@ services:
retries: 5 retries: 5
start_period: 30s start_period: 30s
web: palmr-app:
build: build:
context: ./apps/web context: ./apps/web
args: args:
@@ -38,7 +41,7 @@ services:
ports: ports:
- "4173:4173" - "4173:4173"
depends_on: depends_on:
api: palmr-api:
condition: "service_healthy" condition: "service_healthy"
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
@@ -104,3 +107,4 @@ services:
volumes: volumes:
minio_data: minio_data:
postgres_data: postgres_data:
palmr_uploads:

View File

@@ -1,16 +1,16 @@
services: services:
api: palmr-api:
image: kyantech/palmr-api:v1-beta image: kyantech/palmr-api:v1.1.2-beta
container_name: palmr-api container_name: palmr-api
depends_on: depends_on:
postgres: postgres:
condition: "service_healthy" condition: "service_healthy"
minio: minio:
condition: "service_started" condition: "service_healthy"
environment: environment:
- PORT=3333 - PORT=3333
- DATABASE_URL=postgresql://palmr:palmr123@localhost:5432/palmr?schema=public - DATABASE_URL=postgresql://palmr:palmr123@postgres:5432/palmr?schema=public
- MINIO_ENDPOINT=localhost - MINIO_ENDPOINT=127.0.0.1
- MINIO_PORT=9000 - MINIO_PORT=9000
- MINIO_USE_SSL=false - MINIO_USE_SSL=false
- MINIO_ROOT_USER=palmr - MINIO_ROOT_USER=palmr
@@ -19,28 +19,26 @@ services:
- MINIO_BUCKET_NAME=files - MINIO_BUCKET_NAME=files
- FRONTEND_URL=http://localhost:4173 - FRONTEND_URL=http://localhost:4173
- MINIO_PUBLIC_URL=http://localhost:9000 - MINIO_PUBLIC_URL=http://localhost:9000
- BASE_URL=http://localhost:3333
ports: ports:
- "3333:3333" - "3333:3333"
restart: unless-stopped restart: unless-stopped
volumes:
- palmr_uploads:/app/uploads
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3333/health"] test: ["CMD", "curl", "-f", "http://localhost:3333/health"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
start_period: 10s start_period: 30s
network_mode: "host"
extra_hosts:
- "postgres:127.0.0.1"
- "minio:127.0.0.1"
# The web(frontend) service only work correctly if you run your api on port 3333 palmr-app:
web: image: kyantech/palmr-app:v1.0.1-beta
image: kyantech/palmr-app:v1-beta
container_name: palmr-web container_name: palmr-web
ports: ports:
- "4173:4173" - "4173:4173"
depends_on: depends_on:
api: palmr-api:
condition: "service_healthy" condition: "service_healthy"
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
@@ -60,15 +58,15 @@ services:
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
volumes: volumes:
- minio_data:/data - minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"] test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
ports:
- "9000:9000"
- "9001:9001"
minio-init: minio-init:
image: minio/mc:latest image: minio/mc:latest
@@ -106,3 +104,4 @@ services:
volumes: volumes:
minio_data: minio_data:
postgres_data: postgres_data:
palmr_uploads: