Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NEXT_PUBLIC_PLANNER_ORG_ID=atb
# Specifies what environment to build locally (dev | staging | prod)
NEXT_PUBLIC_ENVIRONMENT=staging

NEXT_PUBLIC_BUILD_ID=local

NEXT_PUBLIC_MAPBOX_API_TOKEN=<mapbox public access token>
NEXT_PUBLIC_MAPBOX_STOP_PLACES_STYLE_URL=<mapbox style url>
Expand All @@ -20,4 +21,4 @@ NEXT_PUBLIC_FIREBASE_APP_ID="1:939812594010:web:0308b2a9cdc80b0d069363"

API_BASE_URL=https://atb-staging.api.mittatb.no
ENTUR_BASE_URL=https://api.staging.entur.io
NEXT_PUBLIC_WS_API_BASE_URL=wss://atb-staging.api.mittatb.no
NEXT_PUBLIC_WS_API_BASE_URL=wss://atb-staging.api.mittatb.no
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Docker Build, Push & Deploy

on:
workflow_dispatch:
release:
types: [published]
push:
Expand All @@ -12,6 +13,7 @@ jobs:
with:
image: gcr.io/atb-mobility-platform/planner-web
build_args: |
NEXT_PUBLIC_BUILD_ID=${{ github.sha }}
ATB_NEXT_PUBLIC_MAPBOX_DEFAULT_LAT=63.43457
ATB_NEXT_PUBLIC_MAPBOX_DEFAULT_LNG=10.39844
ATB_NEXT_PUBLIC_FIREBASE_PROJECT_ID=${{ github.event_name == 'release' && 'atb-mobility-platform' || 'atb-mobility-platform-staging'}}
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY . .
ENV NEXT_TELEMETRY_DISABLED 1

ARG NEXT_PUBLIC_ENVIRONMENT
ARG NEXT_PUBLIC_BUILD_ID

ARG ATB_NEXT_PUBLIC_MAPBOX_DEFAULT_LAT
ARG ATB_NEXT_PUBLIC_MAPBOX_DEFAULT_LNG
Expand Down Expand Up @@ -90,6 +91,7 @@ RUN pnpm generate

# Global build
ENV NEXT_PUBLIC_ENVIRONMENT=$NEXT_PUBLIC_ENVIRONMENT
ENV NEXT_PUBLIC_BUILD_ID=$NEXT_PUBLIC_BUILD_ID

# Build AtB
ENV NEXT_PUBLIC_PLANNER_ORG_ID="atb"
Expand Down
9 changes: 9 additions & 0 deletions src/pages/dev/trip-pattern.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,12 @@
opacity: 0.6;
cursor: not-allowed;
}

.buildInfo {
display: flex;
gap: 1rem;
padding: 1rem;
border-top: 1px solid var(--color-background-neutral-2-background, #e0e0e0);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.75rem;
}
6 changes: 6 additions & 0 deletions src/pages/dev/trip-pattern.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ const DevTripPatternPage: NextPage<DevTripPatternPageProps> = (props) => {
</>
)}
</div>
<footer className={style.buildInfo}>
<span>org: {process.env.NEXT_PUBLIC_PLANNER_ORG_ID}</span>
<span>env: {process.env.NEXT_PUBLIC_ENVIRONMENT || '-'}</span>
<span>firebase: {process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID}</span>
<span>build: {process.env.NEXT_PUBLIC_BUILD_ID || '-'}</span>
</footer>
</DefaultLayout>
);
};
Expand Down
Loading