Skip to content

Commit

Permalink
Merge pull request #788 from CodeForAfrica/fix/fix-failing-build
Browse files Browse the repository at this point in the history
Fix Failing Build
  • Loading branch information
kelvinkipruto authored Jul 18, 2024
2 parents 4e06c52 + 03ecc67 commit 058afe0
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ CMD ["node", "dist/server.js"]

FROM base-deps as pesayetu-deps

COPY packages/hurumap-core/package.json ./packages/hurumap-core/package.json
COPY packages/hurumap-next/package.json ./packages/hurumap-next/package.json
COPY apps/pesayetu/package.json ./apps/pesayetu/package.json

# Use virtual store: https://pnpm.io/cli/fetch#usage-scenario
Expand Down Expand Up @@ -616,6 +618,8 @@ CMD ["node", "apps/vpnmanager/server.js"]

FROM base-deps as climatemappedafrica-deps

COPY packages/hurumap-core/package.json ./packages/hurumap-core/package.json
COPY packages/hurumap-next/package.json ./packages/hurumap-next/package.json
COPY apps/climatemappedafrica/package.json ./apps/climatemappedafrica/package.json

# Use virtual store: https://pnpm.io/cli/fetch#usage-scenario
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ charterafrica:
codeforafrica:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/codeforafrica/.env.local up codeforafrica --build

climatemappedafrica:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/climatemappedafrica/.env.local up climatemappedafrica --build

down:
$(COMPOSE_BUILD_ENV) $(COMPOSE) down --volumes

Expand Down
4 changes: 3 additions & 1 deletion apps/climatemappedafrica/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/climatemappedafrica/*": ["./src/*"]
"@/climatemappedafrica/*": ["./src/*"],
"@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"],
"@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"]
}
},
"exclude": ["node_modules"]
Expand Down
7 changes: 6 additions & 1 deletion apps/climatemappedafrica/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ module.exports = {
},
output: "standalone",
reactStrictMode: false,
transpilePackages: ["@commons-ui/core", "@commons-ui/next", "@hurumap/core"],
transpilePackages: [
"@commons-ui/core",
"@commons-ui/next",
"@hurumap/core",
"@hurumap/next",
],
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
Expand Down
4 changes: 4 additions & 0 deletions apps/climatemappedafrica/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"vega-tooltip": "^0.33.0",
"video.js": "^8.16.1",
"videojs-youtube": "^3.0.1",
"webpack": "^5.93.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
Expand Down Expand Up @@ -113,5 +114,8 @@
"react-test-renderer": "^18.3.1",
"svg-url-loader": "^8.0.0",
"typescript": "^5.5.3"
},
"engines": {
"node": "20.x"
}
}
7 changes: 6 additions & 1 deletion apps/pesayetu/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ module.exports = {
},
output: "standalone",
reactStrictMode: false,
transpilePackages: ["@commons-ui/core", "@commons-ui/next", "@hurumap/core"],
transpilePackages: [
"@commons-ui/core",
"@commons-ui/next",
"@hurumap/core",
"@hurumap/next",
],
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ services:
ports:
- 3000:3000

climatemappedafrica:
build:
context: .
target: climatemappedafrica-runner
args:
- HURUMAP_API_URL
environment:
HURUMAP_API_URL: ${HURUMAP_API_URL}
S3_UPLOAD_KEY: ${S3_UPLOAD_KEY}
S3_UPLOAD_SECRET: ${S3_UPLOAD_SECRET}
S3_UPLOAD_BUCKET: ${S3_UPLOAD_BUCKET}
S3_UPLOAD_REGION: ${S3_UPLOAD_REGION}
ports:
- 3000:3000

pesayetu:
build:
context: .
Expand Down
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 058afe0

Please sign in to comment.