mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-23 06:11:58 +00:00
chore: update .gitignore and docker-compose.yaml for better configuration
- Add `.env` to .gitignore to ignore environment variables file - Update docker-compose.yaml to use environment variables for configuration and improve comments for clarity
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -26,4 +26,7 @@ apps/web/*.sw?
|
|||||||
#SERVER
|
#SERVER
|
||||||
apps/server/node_modules
|
apps/server/node_modules
|
||||||
apps/server/.env
|
apps/server/.env
|
||||||
apps/server/dist/*
|
apps/server/dist/*
|
||||||
|
|
||||||
|
#DEFAULT
|
||||||
|
.env
|
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
palmr-api:
|
palmr-api:
|
||||||
image: kyantech/palmr-api:latest
|
image: kyantech/palmr-api:latest # Make sure to use the correct version (latest) of the image
|
||||||
container_name: palmr-api
|
container_name: palmr-api
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -9,16 +9,16 @@ services:
|
|||||||
condition: "service_healthy"
|
condition: "service_healthy"
|
||||||
environment:
|
environment:
|
||||||
- PORT=3333
|
- PORT=3333
|
||||||
- DATABASE_URL=postgresql://postgres:postgresRootPassword@postgres:5432/palmr_db?schema=public
|
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgresRootPassword}@postgres:5432/palmr_db?schema=public # Database URL with configurable password through POSTGRES_PASSWORD env var
|
||||||
- MINIO_ENDPOINT=minio
|
- MINIO_ENDPOINT=minio # This can change if your MinIO is at a different address
|
||||||
- MINIO_PORT=9000
|
- MINIO_PORT=9000 # Default MinIO port (Change if yours is not the default)
|
||||||
- MINIO_USE_SSL=false
|
- MINIO_USE_SSL=false
|
||||||
- MINIO_ROOT_USER=minio_root_user
|
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user} # MinIO credentials can be configured through MINIO_ROOT_USER env vars
|
||||||
- MINIO_ROOT_PASSWORD=minioRootPassword
|
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword} # MinIO credentials can be configured through MINIO_ROOT_PASSWORD env vars
|
||||||
- MINIO_REGION=sa-east-1
|
- MINIO_REGION=sa-east-1
|
||||||
- MINIO_BUCKET_NAME=files
|
- MINIO_BUCKET_NAME=files
|
||||||
- FRONTEND_URL=http://localhost:4173
|
- FRONTEND_URL=http://localhost:3000 # Frontend URL - Make sure to use the correct frontend URL, depends on where the frontend is running
|
||||||
- BASE_URL=http://localhost:3333
|
- BASE_URL=http://localhost:3333
|
||||||
ports:
|
ports:
|
||||||
- "3333:3333"
|
- "3333:3333"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -30,27 +30,31 @@ services:
|
|||||||
start_period: 30s
|
start_period: 30s
|
||||||
|
|
||||||
palmr-app:
|
palmr-app:
|
||||||
image: kyantech/palmr-app:latest
|
image: kyantech/palmr-app:v2.0.0-beta # Make sure to use the correct version (latest) of the image
|
||||||
container_name: palmr-web
|
container_name: palmr-web
|
||||||
ports:
|
|
||||||
- "4173:4173"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
palmr-api:
|
palmr-api:
|
||||||
condition: "service_healthy"
|
condition: "service_healthy"
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
- NEXT_TELEMETRY_DISABLED=1
|
||||||
|
- API_BASE_URL=http://palmr-api:3333 # Here we use docker's internal network to reference the backend service (can be changed if needed)
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:4173"]
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||||
interval: 10s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 3
|
||||||
start_period: 10s
|
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio:RELEASE.2025-03-12T18-04-18Z
|
image: minio/minio:RELEASE.2025-03-12T18-04-18Z # Use only version RELEASE.2025-03-12T18-04-18Z to avoid compatibility issues with the backend
|
||||||
container_name: minio
|
container_name: minio
|
||||||
environment:
|
environment:
|
||||||
- MINIO_ROOT_USER=minio_root_user
|
# MinIO credentials - same as above, configurable through environment variables
|
||||||
- MINIO_ROOT_PASSWORD=minioRootPassword
|
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user}
|
||||||
|
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword}
|
||||||
- MINIO_SITE_REGION=sa-east-1
|
- MINIO_SITE_REGION=sa-east-1
|
||||||
command: server /data --console-address ":9001"
|
command: server /data --console-address ":9001"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -66,7 +70,7 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
minio-init:
|
minio-init:
|
||||||
image: minio/mc:RELEASE.2025-03-12T17-29-24Z
|
image: minio/mc:RELEASE.2025-03-12T17-29-24Z # Use only version RELEASE.2025-03-12T17-29-24Z to avoid compatibility issues with the backend and MinIO
|
||||||
container_name: minio-init
|
container_name: minio-init
|
||||||
depends_on:
|
depends_on:
|
||||||
minio:
|
minio:
|
||||||
@@ -75,18 +79,20 @@ services:
|
|||||||
entrypoint: >
|
entrypoint: >
|
||||||
sh -c "
|
sh -c "
|
||||||
sleep 5 &&
|
sleep 5 &&
|
||||||
mc alias set myminio http://minio:9000 minio_root_user minioRootPassword &&
|
mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER:-minio_root_user} ${MINIO_ROOT_PASSWORD:-minioRootPassword} &&
|
||||||
mc mb myminio/files --ignore-existing &&
|
mc mb myminio/files --ignore-existing &&
|
||||||
mc anonymous set download myminio/files
|
mc anonymous set download myminio/files
|
||||||
"
|
"
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: bitnami/postgresql:17.2.0
|
image: bitnami/postgresql:17.2.0 # You can use any postgres version you prefer, but remember that some versions might not be compatible
|
||||||
container_name: palmr-postgres
|
container_name: palmr-postgres
|
||||||
environment:
|
environment:
|
||||||
- POSTGRESQL_USERNAME=postgres
|
# PostgreSQL credentials configurable through environment variables
|
||||||
- POSTGRESQL_PASSWORD=postgresRootPassword
|
# POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB can be set to override defaults
|
||||||
- POSTGRESQL_DATABASE=palmr_db
|
- POSTGRESQL_USERNAME=${POSTGRES_USER:-postgres}
|
||||||
|
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD:-postgresRootPassword}
|
||||||
|
- POSTGRESQL_DATABASE=${POSTGRES_DB:-palmr_db}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/bitnami/postgresql
|
- postgres_data:/bitnami/postgresql
|
||||||
ports:
|
ports:
|
||||||
|
Reference in New Issue
Block a user