diff --git a/.env.example b/.env.example index c6f1c0cab..eb1f30f53 100644 --- a/.env.example +++ b/.env.example @@ -1,18 +1,17 @@ -# # # # # # -# Secrets # -# # # # # # - -POSTGRES_PASSWORD=my_password -JWT_SECRET=secret_jwt -ENCRYPT_CRYPTO_SECRET_KEY="0123456789abcdef0123456789abcdef" - # ================================================ # API Backend # ================================================ ENV=dev DISTRIBUTION=selfhosted # selfhosted or managed OAUTH_REDIRECT_BASE=http://localhost:3000 +JWT_SECRET=secret_jwt +ENCRYPT_CRYPTO_SECRET_KEY="0123456789abcdef0123456789abcdef" +BACKEND_PORT=3000 + +#Managed only SENTRY_DSN= + + # ================================================ # REDIS REDIS_HOST=redis @@ -26,9 +25,10 @@ REDIS_PASS=A3vniod98Zbuvn9u5 POSTGRES_USER=my_user POSTGRES_DB=panora_db POSTGRES_HOST=postgres +POSTGRES_PASSWORD=my_password -# Each Provider is of form PROVIDER_TICKETING_SOFTWAREMODE_ATTRIBUTE +# Each Provider is of form PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE # ================================================ # Integration Providers # ================================================ @@ -74,21 +74,6 @@ NEXT_PUBLIC_BACKEND_DOMAIN=http://localhost:3000 # https://api.panora.dev/ NEXT_PUBLIC_MAGIC_LINK_DOMAIN=http://localhost:81 NEXT_PUBLIC_POSTHOG_KEY= NEXT_PUBLIC_POSTHOG_HOST= - -NEXT_PUBLIC_STYTCH_PROJECT_ID="project-test" -NEXT_PUBLIC_STYTCH_SECRET="example" -NEXT_PUBLIC_STYTCH_PROJECT_ENV="test" -NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN="public-token-test" NEXT_PUBLIC_WEBAPP_DOMAIN="http://localhost" - -# ================================================ -# Minio (s3 file storage) -# ================================================ -MINIO_ROOT_USER=myaccesskey13 -MINIO_ROOT_PASSWORD=mysecretkey12 -AWS_S3_REGION=us-east-1 -# S3 Buckets -# Ticketing Attachments bucket -S3_TCG_ATTACHMENTS_BUCKETNAME=tcg-attachments -BUCKET_TCG_ATTACHMENTS_USER=BUCKET_TCG_ATTACHMENTS_USER01 -BUCKET_TCG_ATTACHMENTS_PW=BUCKET_TCG_ATTACHMENTS_PW01 \ No newline at end of file +# Disable Next.js spyware +NEXT_TELEMETRY_DISABLED=1 \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 1cf3db8ec..795d528e8 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -145,12 +145,8 @@ services: VITE_BACKEND_DOMAIN: ${NEXT_PUBLIC_BACKEND_DOMAIN} VITE_FRONTEND_DOMAIN: ${NEXT_PUBLIC_MAGIC_LINK_DOMAIN} environment: - NEXT_PUBLIC_STYTCH_SECRET: ${NEXT_PUBLIC_STYTCH_SECRET} - NEXT_PUBLIC_STYTCH_PROJECT_ID: ${NEXT_PUBLIC_STYTCH_PROJECT_ID} NEXT_PUBLIC_DISTRIBUTION: ${DISTRIBUTION} NEXT_PUBLIC_BACKEND_DOMAIN: ${NEXT_PUBLIC_BACKEND_DOMAIN} - NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN: ${NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN} - NEXT_PUBLIC_STYTCH_PROJECT_ENV: ${NEXT_PUBLIC_STYTCH_PROJECT_ENV} NEXT_PUBLIC_MAGIC_LINK_DOMAIN: ${NEXT_PUBLIC_MAGIC_LINK_DOMAIN} NEXT_PUBLIC_WEBAPP_DOMAIN: ${NEXT_PUBLIC_WEBAPP_DOMAIN} restart: unless-stopped diff --git a/docker-compose.source.yml b/docker-compose.source.yml index 77c62534b..86147cca3 100644 --- a/docker-compose.source.yml +++ b/docker-compose.source.yml @@ -136,10 +136,6 @@ services: dockerfile: ./apps/client-ts/Dockerfile context: ./ args: - NEXT_PUBLIC_STYTCH_PROJECT_ID: ${NEXT_PUBLIC_STYTCH_PROJECT_ID} - NEXT_PUBLIC_STYTCH_SECRET: ${NEXT_PUBLIC_STYTCH_SECRET} - NEXT_PUBLIC_STYTCH_PROJECT_ENV: ${NEXT_PUBLIC_STYTCH_PROJECT_ENV} - NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN: ${NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN} NEXT_PUBLIC_DISTRIBUTION: ${DISTRIBUTION} NEXT_PUBLIC_BACKEND_DOMAIN: ${NEXT_PUBLIC_BACKEND_DOMAIN} NEXT_PUBLIC_FRONTEND_DOMAIN: ${NEXT_PUBLIC_FRONTEND_DOMAIN} diff --git a/docker-compose.yml b/docker-compose.yml index 38e328349..155555183 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: image: panoradotdev/backend-api:selfhosted environment: DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false + PORT: ${BACKEND_PORT} DISTRIBUTION: ${DISTRIBUTION} JWT_SECRET: ${JWT_SECRET} REDIS_HOST: ${REDIS_HOST} @@ -114,7 +115,12 @@ services: condition: service_healthy networks: - backend - + healthcheck: + #test: ["CMD", "nc", "-z", "localhost", "${BACKEND_PORT}"] + test: ["CMD", "curl", "-f", "http://api:3000/health"] # Alternative healthcheck method + interval: 10s + timeout: 1s + retries: 5 redis: image: valkey/valkey:7.2-alpine @@ -134,7 +140,8 @@ services: ports: - 81:80 depends_on: - - api + api: + condition: service_healthy networks: - backend - frontend @@ -142,10 +149,6 @@ services: webapp-next: image: panoradotdev/frontend-webapp:selfhosted environment: - NEXT_PUBLIC_STYTCH_PROJECT_ID: ${NEXT_PUBLIC_STYTCH_PROJECT_ID} - NEXT_PUBLIC_STYTCH_SECRET: ${NEXT_PUBLIC_STYTCH_SECRET} - NEXT_PUBLIC_STYTCH_PROJECT_ENV: ${NEXT_PUBLIC_STYTCH_PROJECT_ENV} - NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN: ${NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN} NEXT_PUBLIC_DISTRIBUTION: ${DISTRIBUTION} NEXT_PUBLIC_BACKEND_DOMAIN: ${NEXT_PUBLIC_BACKEND_DOMAIN} NEXT_PUBLIC_MAGIC_LINK_DOMAIN: ${NEXT_PUBLIC_MAGIC_LINK_DOMAIN} @@ -154,7 +157,8 @@ services: ports: - 80:8090 depends_on: - - api + api: + condition: service_healthy networks: - backend - frontend diff --git a/packages/api/Dockerfile b/packages/api/Dockerfile index 4368fc77a..dfaba9bb3 100644 --- a/packages/api/Dockerfile +++ b/packages/api/Dockerfile @@ -42,6 +42,8 @@ RUN pnpm run build # ======================================================================== FROM base AS runner +RUN apk add --no-cache libc6-compat netcat-openbsd curl + WORKDIR /app COPY --from=installer ./app .