Skip to content

Commit

Permalink
fix(agora): build agora-api app as standalone app (#2774)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Aug 27, 2024
1 parent f1722fe commit 574d8b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
1 change: 0 additions & 1 deletion apps/agora/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ RUN chmod +x docker-entrypoint.sh

WORKDIR ${APP_DIR}
COPY dist/apps/agora/api ${APP_DIR}
RUN npm install

HEALTHCHECK --interval=2s --timeout=3s --retries=20 --start-period=5s \
CMD curl --fail --silent "localhost:3333/health" | jq '.status' | grep UP || exit 1
Expand Down
43 changes: 11 additions & 32 deletions apps/agora/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@
},
"build": {
"executor": "@nx/webpack:webpack",
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"target": "node",
"compiler": "tsc",
"outputPath": "dist/apps/agora/api",
"main": "apps/agora/api/src/main.ts",
"tsConfig": "apps/agora/api/tsconfig.app.json",
"assets": [
"apps/agora/api/src/assets"
],
"assets": ["apps/agora/api/src/assets"],
"webpackConfig": "apps/agora/api/webpack.config.js",
"generatePackageJson": true
"externalDependencies": []
},
"configurations": {
"development": {},
Expand Down Expand Up @@ -69,39 +65,24 @@
"options": {
"context": ".",
"metadata": {
"images": [
"ghcr.io/sage-bionetworks/agora-api"
],
"tags": [
"type=edge,branch=main",
"type=raw,value=local",
"type=sha"
]
"images": ["ghcr.io/sage-bionetworks/agora-api"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": [
"build"
]
"dependsOn": ["build"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": ".",
"metadata": {
"images": [
"ghcr.io/sage-bionetworks/agora-api"
],
"tags": [
"type=edge,branch=main",
"type=sha"
]
"images": ["ghcr.io/sage-bionetworks/agora-api"],
"tags": ["type=edge,branch=main", "type=sha"]
},
"push": true
},
"dependsOn": [
"build-image"
]
"dependsOn": ["build-image"]
},
"scan-image": {
"executor": "nx:run-commands",
Expand All @@ -112,13 +93,11 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/agora/api/jest.config.ts"
}
}
},
"tags": []
}
}

0 comments on commit 574d8b0

Please sign in to comment.