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
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push docker images
run: make docker ENVIRONMENT=-dev APP_DIR=new-branding NEXT_PUBLIC_BRIDGE_URL=${{ secrets.DEV_NEXT_PUBLIC_BRIDGE_URL }}
run: make docker ENVIRONMENT=-dev APP_DIR=new-branding NEXT_PUBLIC_BRIDGE_URL=${{ secrets.DEV_NEXT_PUBLIC_BRIDGE_URL }} NEXT_PUBLIC_CMS_API_URL=${{ secrets.DEV_NEXT_PUBLIC_CMS_API_URL }} CMS_API_URL=${{ secrets.DEV_CMS_API_URL }}

deploy:
needs: build-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push docker images
run: make docker ENVIRONMENT=-prod APP_DIR=new-branding IMAGE_TAG=${{ inputs.version }} NEXT_PUBLIC_BRIDGE_URL=${{ secrets.PROD_NEXT_PUBLIC_BRIDGE_URL }}
run: make docker ENVIRONMENT=-prod APP_DIR=new-branding IMAGE_TAG=${{ inputs.version }} NEXT_PUBLIC_BRIDGE_URL=${{ secrets.PROD_NEXT_PUBLIC_BRIDGE_URL }} NEXT_PUBLIC_CMS_API_URL=${{ secrets.PROD_NEXT_PUBLIC_CMS_API_URL }} CMS_API_URL=${{ secrets.PROD_CMS_API_URL }}

deploy:
needs: build-prod
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ ENV EMAIL_DEV_TO=placeholder@example.com
ENV PUBLIC_SITE_URL=https://example.com
ARG NEXT_PUBLIC_BRIDGE_URL=https://dev.bridge.tricorn.network/
ENV NEXT_PUBLIC_BRIDGE_URL=$NEXT_PUBLIC_BRIDGE_URL
ARG NEXT_PUBLIC_CMS_API_URL=https://placeholder.cms.example.com
ENV NEXT_PUBLIC_CMS_API_URL=$NEXT_PUBLIC_CMS_API_URL
ARG CMS_API_URL=https://placeholder.cms.example.com
ENV CMS_API_URL=$CMS_API_URL

RUN npm run build

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export DOCKER_BUILDKIT=1
.PHONY: build push docker build-cms push-cms docker-cms help

build: ## Build utexo landing docker image.
docker build --build-arg APP_DIR=$(APP_DIR) --build-arg NEXT_PUBLIC_BRIDGE_URL=$(NEXT_PUBLIC_BRIDGE_URL) -f ./Dockerfile -t $(IMAGE_UTEXO_LANDING_BACKUP) . && \
docker build --build-arg APP_DIR=$(APP_DIR) --build-arg NEXT_PUBLIC_BRIDGE_URL=$(NEXT_PUBLIC_BRIDGE_URL) -f ./Dockerfile -t $(IMAGE_UTEXO_LANDING_LATEST) .
docker build --build-arg APP_DIR=$(APP_DIR) --build-arg NEXT_PUBLIC_BRIDGE_URL=$(NEXT_PUBLIC_BRIDGE_URL) --build-arg NEXT_PUBLIC_CMS_API_URL=$(NEXT_PUBLIC_CMS_API_URL) --build-arg CMS_API_URL=$(CMS_API_URL) -f ./Dockerfile -t $(IMAGE_UTEXO_LANDING_BACKUP) . && \
docker build --build-arg APP_DIR=$(APP_DIR) --build-arg NEXT_PUBLIC_BRIDGE_URL=$(NEXT_PUBLIC_BRIDGE_URL) --build-arg NEXT_PUBLIC_CMS_API_URL=$(NEXT_PUBLIC_CMS_API_URL) --build-arg CMS_API_URL=$(CMS_API_URL) -f ./Dockerfile -t $(IMAGE_UTEXO_LANDING_LATEST) .

push: ## Push utexo landing docker image.
docker push $(IMAGE_UTEXO_LANDING_BACKUP) && \
Expand Down
5 changes: 0 additions & 5 deletions cms/src/collections/NewsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export const NewsTypes: CollectionConfig = {
type: 'text',
required: true,
},
{
name: 'value',
type: 'text',
required: true,
},
],
hooks: {
beforeDelete: [
Expand Down
2 changes: 0 additions & 2 deletions cms/src/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export interface Media {
export interface NewsType {
id: number;
label: string;
value: string;
updatedAt: string;
createdAt: string;
}
Expand Down Expand Up @@ -325,7 +324,6 @@ export interface MediaSelect<T extends boolean = true> {
*/
export interface NewsTypesSelect<T extends boolean = true> {
label?: T;
value?: T;
updatedAt?: T;
createdAt?: T;
}
Expand Down
5 changes: 5 additions & 0 deletions new-branding/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ PUBLIC_SITE_URL=https://utexo.com

# Bridge form URL (endpoint pointing to the bridge submission form used for routing requests)
NEXT_PUBLIC_BRIDGE_URL=https://example.com

# CMS base URL
CMS_API_URL=https://example.com
# CMS base URL for client side
NEXT_PUBLIC_CMS_API_URL=https://example.com
15 changes: 15 additions & 0 deletions new-branding/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
import type { NextConfig } from "next";

const wordpressUrl = new URL(process.env.CMS_API_URL || "http://localhost:3000");

const nextConfig: NextConfig = {
output: "standalone",

compress: true,

images: {
formats: ["image/avif", "image/webp"],

remotePatterns: [
{
protocol: wordpressUrl.protocol.replace(":", "") as "http" | "https",
hostname: wordpressUrl.hostname,
port: wordpressUrl.port,
pathname: "/api/media/**",
},
],
},

turbopack: {
root: __dirname,

resolveAlias: {
"@": "./",
},
Expand Down
Loading
Loading