Skip to content

Commit

Permalink
Rename app
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Jul 5, 2024
1 parent 32a3646 commit 130b93c
Show file tree
Hide file tree
Showing 333 changed files with 230 additions and 230 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [main]
paths:
- "apps/climatemapped-africa/**"
- "apps/climatemappedafrica/**"
- "Dockerfile"
- ".github/workflows/climatemapped-africa-deploy-dev.yml"
- ".github/workflows/climatemappedafrica-deploy-dev.yml"

concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
Expand All @@ -15,7 +15,7 @@ concurrency:
env:
DOKKU_REMOTE_BRANCH: "master"
DOKKU_REMOTE_URL: "ssh://azureuser@ui-1.dev.codeforafrica.org"
IMAGE_NAME: "codeforafrica/climatemapped-africa-ui"
IMAGE_NAME: "codeforafrica/climatemappedafrica-ui"
NEXT_PUBLIC_APP_URL: "https://climatemapped-africa-ui.dev.codeforafrica.org"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_NAME: climatemapped-africa-ui
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: climatemapped-africa-runner
target: climatemappedafrica-runner
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"

Expand Down
38 changes: 19 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -604,21 +604,21 @@ CMD ["node", "apps/vpnmanager/server.js"]
# ============================================================================

#
# climatemapped-africa-desp: image with all climatemapped-africa dependencies
# climatemappedafrica-desp: image with all climatemappedafrica dependencies
# ---------------------------------------------------

FROM base-deps as climatemapped-africa-deps
FROM base-deps as climatemappedafrica-deps

COPY apps/climatemapped-africa/package.json ./apps/climatemapped-africa/package.json
COPY apps/climatemappedafrica/package.json ./apps/climatemappedafrica/package.json

# Use virtual store: https://pnpm.io/cli/fetch#usage-scenario
RUN pnpm --filter "./apps/climatemapped-africa" install --offline --frozen-lockfile
RUN pnpm --filter "./apps/climatemappedafrica" install --offline --frozen-lockfile

#
# climatemapped-africa-builder: image that uses deps to build shippable output
# climatemappedafrica-builder: image that uses deps to build shippable output
# ----------------------------------------------------------------

FROM base-builder as climatemapped-africa-builder
FROM base-builder as climatemappedafrica-builder

ARG NEXT_TELEMETRY_DISABLED \
# Next.js / Payload (build time)
Expand All @@ -640,19 +640,19 @@ CMD ["node", "apps/vpnmanager/server.js"]
HURUMAP_API_URL

# This is in app-builder instead of base-builder just incase app-deps adds deps
COPY --from=climatemapped-africa-deps /workspace/node_modules ./node_modules
COPY --from=climatemappedafrica-deps /workspace/node_modules ./node_modules

COPY --from=climatemapped-africa-deps /workspace/apps/climatemapped-africa/node_modules ./apps/climatemapped-africa/node_modules
COPY --from=climatemappedafrica-deps /workspace/apps/climatemappedafrica/node_modules ./apps/climatemappedafrica/node_modules

COPY apps/climatemapped-africa ./apps/climatemapped-africa
COPY apps/climatemappedafrica ./apps/climatemappedafrica

RUN pnpm --filter "./apps/climatemapped-africa" build
RUN pnpm --filter "./apps/climatemappedafrica" build

#
# climatemapped-africa-runner: final deployable image
# climatemappedafrica-runner: final deployable image
# ---------------------------------------

FROM base-runner as climatemapped-africa-runner
FROM base-runner as climatemappedafrica-runner

ARG NEXT_PUBLIC_IMAGE_DOMAINS \
NEXT_PUBLIC_IMAGE_SCALE_FACTOR \
Expand All @@ -666,24 +666,24 @@ CMD ["node", "apps/vpnmanager/server.js"]

RUN set -ex \
# Create nextjs cache dir w/ correct permissions
&& mkdir -p ./apps/climatemapped-africa/.next \
&& chown nextjs:nodejs ./apps/climatemapped-africa/.next
&& mkdir -p ./apps/climatemappedafrica/.next \
&& chown nextjs:nodejs ./apps/climatemappedafrica/.next

# PNPM
# symlink some dependencies
COPY --from=climatemapped-africa-builder --chown=nextjs:nodejs /workspace/node_modules ./node_modules
COPY --from=climatemappedafrica-builder --chown=nextjs:nodejs /workspace/node_modules ./node_modules

# Next.js
# Public assets
COPY --from=climatemapped-africa-builder --chown=nextjs:nodejs /workspace/apps/climatemapped-africa/public ./apps/climatemapped-africa/public
COPY --from=climatemappedafrica-builder --chown=nextjs:nodejs /workspace/apps/climatemappedafrica/public ./apps/climatemappedafrica/public

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=climatemapped-africa-builder --chown=nextjs:nodejs /workspace/apps/climatemapped-africa/.next/standalone ./apps/climatemapped-africa
COPY --from=climatemapped-africa-builder --chown=nextjs:nodejs /workspace/apps/climatemapped-africa/.next/static ./apps/climatemapped-africa/.next/static
COPY --from=climatemappedafrica-builder --chown=nextjs:nodejs /workspace/apps/climatemappedafrica/.next/standalone ./apps/climatemappedafrica
COPY --from=climatemappedafrica-builder --chown=nextjs:nodejs /workspace/apps/climatemappedafrica/.next/static ./apps/climatemappedafrica/.next/static

USER nextjs

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "apps/climatemapped-africa/server.js"]
CMD ["node", "apps/climatemappedafrica/server.js"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
...defaultConfig,
moduleNameMapper: {
...moduleNameMapper,
"^@/climatemapped-africa/(.*)$": "<rootDir>/src/$1",
"^@/climatemappedafrica/(.*)$": "<rootDir>/src/$1",
"^@/commons-ui/core/(.*)$":
"<rootDir>/../../packages/commons-ui-core/src/$1",
"^@/commons-ui/next/(.*)$":
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"paths": {
"@/commons-ui/core/*": ["../../packages/commons-ui-core/src/*"],
"@/commons-ui/next/*": ["../../packages/commons-ui-next/src/*"],
"@/climatemapped-africa/*": ["./src/*"]
"@/climatemappedafrica/*": ["./src/*"]
}
},
"exclude": ["node_modules"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "climatemapped-africa",
"name": "climatemappedafrica",
"version": "0.0.1",
"private": true,
"author": "Code for Africa <tech@codeforafrica.org>",
"description": "Climate Mapped Africa ",
"keywords": [
"climatemapped-africa",
"climatemappedafrica",
"next",
"next.js",
"react",
Expand All @@ -14,7 +14,7 @@
"repository": {
"type": "git",
"url": "https://github.com/codeforafrica/ui.git",
"directory": "apps/climatemapped-africa"
"directory": "apps/climatemappedafrica"
},
"license": "MIT",
"bugs": {
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useRouter } from "next/router";
import PropTypes from "prop-types";
import React, { useEffect, useState } from "react";

import SearchIcon from "@/climatemapped-africa/assets/icons/Group 3257.svg";
import Link from "@/climatemapped-africa/components/Link";
import SearchIcon from "@/climatemappedafrica/assets/icons/Group 3257.svg";
import Link from "@/climatemappedafrica/components/Link";

const useStyles = makeStyles(({ palette, typography }) => ({
root: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";

import DropdownSearch from ".";

import { searchArgs } from "@/climatemapped-africa/config";
import { searchArgs } from "@/climatemappedafrica/config";

export default {
title: "Components/DropdownSearch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import useExplore from "./useExplore";
import useProfileGeography from "./useProfileGeography";
import useStyles from "./useStyles";

import Location from "@/climatemapped-africa/components/HURUmap/Location";
import Panel from "@/climatemapped-africa/components/HURUmap/Panel";
import Location from "@/climatemappedafrica/components/HURUmap/Location";
import Panel from "@/climatemappedafrica/components/HURUmap/Panel";

const Map = dynamic(
() => import("@/climatemapped-africa/components/HURUmap/Map"),
() => import("@/climatemappedafrica/components/HURUmap/Map"),
{
ssr: false,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useReducer } from "react";

import Link from "@/climatemapped-africa/components/Link";
import Link from "@/climatemappedafrica/components/Link";

function extendProfileTags(profile, options) {
const { tags: originalTags, ...other } = profile || {};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useSWR from "swr";

import fetchJson from "@/climatemapped-africa/utils/fetchJson";
import fetchJson from "@/climatemappedafrica/utils/fetchJson";

function useProfileGeography(shouldFetch) {
const fetcher = (code) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import React from "react";

import useStyles from "./useStyles";

import Link from "@/climatemapped-africa/components/Link";
import Section from "@/climatemapped-africa/components/Section";
import Link from "@/climatemappedafrica/components/Link";
import Section from "@/climatemappedafrica/components/Section";

function Footer({
title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";

import Footer from ".";

import { footerArgs } from "@/climatemapped-africa/config";
import { footerArgs } from "@/climatemappedafrica/config";

export default {
title: "Sections/Footer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from "react";

import useStyles from "./useStyles";

import Image from "@/climatemapped-africa/components/Image";
import Image from "@/climatemappedafrica/components/Image";

function CategoryHeader({ title, description, icon, ...props }) {
const classes = useStyles();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import Group4658 from "@/climatemapped-africa/assets/icons/Group 4658-white.svg";
import CategoryHeader from "@/climatemapped-africa/components/HURUmap/CategoryHeader";
import Group4658 from "@/climatemappedafrica/assets/icons/Group 4658-white.svg";
import CategoryHeader from "@/climatemappedafrica/components/HURUmap/CategoryHeader";

export default {
title: "Components/HURUmap/CategoryHeader",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function BarChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function DonutChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { useEffect, useState, useCallback } from "react";

import { idify } from "./utils";

import ChartFilter from "@/climatemapped-africa/components/HURUmap/ChartFilter";
import ChartFilter from "@/climatemappedafrica/components/HURUmap/ChartFilter";

const useStyles = makeStyles(({ typography }) => ({
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function LineChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function MultiLineChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import data from "./data";
import signals from "./signals";

import { createFiltersForGroups } from "@/climatemapped-africa/components/HURUmap/Chart/utils";
import theme from "@/climatemapped-africa/theme";
import { createFiltersForGroups } from "@/climatemappedafrica/components/HURUmap/Chart/utils";
import theme from "@/climatemappedafrica/theme";

export default function Scope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { hurumapArgs } from "@/climatemapped-africa/config";
import theme from "@/climatemapped-africa/theme";
import { hurumapArgs } from "@/climatemappedafrica/config";
import theme from "@/climatemappedafrica/theme";

const graphValueTypes = {
Percentage: "percentage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function StackedChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function TreemapChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function VerticalBarChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import merge from "deepmerge";

import Scope from "./Scope";

import theme from "@/climatemapped-africa/theme";
import theme from "@/climatemappedafrica/theme";

export default function VerticalStackedChartScope(
primaryData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import configureScope from "./configureScope";
import Filters from "./Filters";
import { calculateTooltipPosition, idify } from "./utils";

import ChartTooltip from "@/climatemapped-africa/components/HURUmap/ChartTooltip";
import IndicatorTitle from "@/climatemapped-africa/components/HURUmap/IndicatorTitle";
import Source from "@/climatemapped-africa/components/HURUmap/Source";
import theme from "@/climatemapped-africa/theme";
import ChartTooltip from "@/climatemappedafrica/components/HURUmap/ChartTooltip";
import IndicatorTitle from "@/climatemappedafrica/components/HURUmap/IndicatorTitle";
import Source from "@/climatemappedafrica/components/HURUmap/Source";
import theme from "@/climatemappedafrica/theme";

const useStyles = makeStyles(({ typography }) => ({
root: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-anonymous-default-export */
import React from "react";

import Chart from "@/climatemapped-africa/components/HURUmap/Chart";
import Chart from "@/climatemappedafrica/components/HURUmap/Chart";

export default {
title: "Components/HURUmap/Chart",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React, { useEffect, useState } from "react";

import useStyles from "./useStyles";

import { ReactComponent as CloseIcon } from "@/climatemapped-africa/assets/icons/Component1081.svg";
import Select from "@/climatemapped-africa/components/Select";
import { ReactComponent as CloseIcon } from "@/climatemappedafrica/assets/icons/Component1081.svg";
import Select from "@/climatemappedafrica/components/Select";

function ChartFilter({
groups,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import ChartFilter from "@/climatemapped-africa/components/HURUmap/ChartFilter";
import ChartFilter from "@/climatemappedafrica/components/HURUmap/ChartFilter";

export default {
title: "Components/HURUmap/ChartFilter",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import ChartTooltip from "@/climatemapped-africa/components/HURUmap/ChartTooltip";
import ChartTooltip from "@/climatemappedafrica/components/HURUmap/ChartTooltip";

export default {
title: "Components/HURUmap/ChartTooltip",
Expand Down
Loading

0 comments on commit 130b93c

Please sign in to comment.