diff --git a/backend/.dockerignore b/backend/.dockerignore index e69de29..b5abc38 100644 --- a/backend/.dockerignore +++ b/backend/.dockerignore @@ -0,0 +1,6 @@ +# backend/.dockerignore +node_modules +dist +.env +.env.* +*.log diff --git a/backend/coolify.yaml b/backend/coolify.yaml new file mode 100644 index 0000000..9acddab --- /dev/null +++ b/backend/coolify.yaml @@ -0,0 +1,26 @@ +# backend/coolify.yaml +services: + backend: + build: + context: . + dockerfile: Dockerfile + environment: + - NODE_ENV=production + - PORT=3000 + - DATABASE_URL=${DATABASE_URL} + - JWT_SECRET=${JWT_SECRET} + - CORS_ORIGINS=http://localhost:5173,https://placebo.mk,https://www.placebo.mk + ports: + - "3000:3000" + healthcheck: + test: + [ + "CMD", + "wget", + "-q", + "--spider", + "http://localhost:3000/health || exit 1", + ] + interval: 30s + timeout: 10s + retries: 3 diff --git a/backend/package.json b/backend/package.json index 8a43d41..154d6b9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -21,7 +21,7 @@ "test:e2e": "jest --config ./test/jest-e2e.json", "prisma:generate": "prisma generate", "prisma:migrate:dev": "prisma migrate dev", - "prisma:migrate:deploy": "prisma migrate deploy" + "prisma:migrate": "prisma migrate deploy" }, "dependencies": { "@aws-sdk/client-s3": "^3.679.0",