Skip to content

Commit

Permalink
Merge pull request #758 from CodeForAfrica/bugfix/charterafrica-prod-…
Browse files Browse the repository at this point in the history
…build

Fixed charterafrica build. Add essential files
  • Loading branch information
koechkevin authored Jul 8, 2024
2 parents 87ca801 + e7a39d0 commit 88e76b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/node_modules

# Since we can't use output: "standalone", copy all app's dependencies
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/node_modules ./apps/charterafrica/node_modules

COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/next.config.js ./apps/charterafrica/next.config.js
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/.env ./apps/charterafrica/.env
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/migrations ./apps/charterafrica/migrations
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/app.json ./apps/charterafrica/app.json
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/scripts ./apps/charterafrica/scripts
# Next.js
# Public assets
COPY --from=charterafrica-builder --chown=nextjs:nodejs /workspace/apps/charterafrica/public ./apps/charterafrica/public
Expand Down Expand Up @@ -308,7 +312,9 @@ COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/node_modules

# Since we can't use output: "standalone", copy all app's dependencies
COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/apps/codeforafrica/node_modules ./apps/codeforafrica/node_modules

COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/apps/codeforafrica/next.config.js ./apps/codeforafrica/next.config.js
COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/apps/codeforafrica/.env ./apps/codeforafrica/.env
COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/apps/codeforafrica/migrations ./apps/codeforafrica/migrations
# Next.js
# Public assets
COPY --from=codeforafrica-builder --chown=nextjs:nodejs /workspace/apps/codeforafrica/public ./apps/codeforafrica/public
Expand Down Expand Up @@ -399,7 +405,8 @@ RUN set -ex \
# PNPM
# symlink some dependencies
COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/node_modules ./node_modules

COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/next.config.js ./apps/roboshield/next.config.js
COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/.env ./apps/roboshield/.env
# Since we can't use output: "standalone", copy all app's dependencies
COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/node_modules ./apps/roboshield/node_modules

Expand Down
2 changes: 1 addition & 1 deletion apps/charterafrica/contrib/dokku/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM codeforafrica/charterafrica-ui:0.1.28
FROM codeforafrica/charterafrica-ui:0.1.29
2 changes: 1 addition & 1 deletion apps/charterafrica/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "charterafrica",
"version": "0.1.28",
"version": "0.1.29",
"private": true,
"author": "Code for Africa <tech@codeforafrica.org>",
"description": "This is the official code for https://charter.africa site",
Expand Down
6 changes: 1 addition & 5 deletions apps/charterafrica/src/lib/data/local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ export async function getServerSideTags(collection, context) {
return getTags(collection, api, context);
}

export async function getPageServerSideProps({
locale = "en",
...contextWithoutLocale
}) {
const context = { ...contextWithoutLocale, locale };
export async function getPageServerSideProps(context) {
const props = await getPageProps(api, context);

if (!props) {
Expand Down

0 comments on commit 88e76b8

Please sign in to comment.