Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI container #12

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
32 changes: 28 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ networks:
backnet:
frontnet:


services:
autoheal:
restart: always
Expand Down Expand Up @@ -99,6 +98,8 @@ services:
networks:
- backnet
environment:
NODE_ENV: local
WS_NODE_URL: ws://zeitgeist-blockchain:9944
DB_HOST: subsquid-db
DB_NAME: postgres
DB_PORT: 5432
Expand All @@ -107,6 +108,29 @@ services:
- $SUBSQUID_API_PORT:4350
command: yarn api:start

# zeitgeist-frontend:
# networks:
# - frontnet
zeitgeist-frontend:
networks:
- backnet
container_name: ui
build:
context: .
dockerfile: ui/Dockerfile
depends_on:
ipfs:
condition: service_started
subsquid-db:
condition: service_healthy
zeitgeist-blockchain:
condition: service_started
ports:
- "3000:3000"
volumes:
- ${BASE_PATH}:/app/ui
environment:
- NEXT_PUBLIC_VERCEL_ENV=local
- NEXT_PUBLIC_SANITY_PROJECT_ID=4wbnjof1
- NEXT_PUBLIC_SANITY_VERSION=2022-03-07
- NEXT_PUBLIC_SUBSQUID_ENDPOINT=http://localhost:4350/graphql
- NEXT_PUBLIC_WS_ENDPOINT=ws://127.0.0.1:9944
- SUBSQUID_ENDPOINT=http://subsquid-api:4350/graphql
- WS_ENDPOINT=ws://zeitgeist-blockchain:9944
23 changes: 23 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:18

# Set the working directory
WORKDIR /app

# Install git
RUN apt-get update && apt-get install -y git

# Clone the repository from GitHub
RUN git clone -b tr-docker-changes https://github.com/zeitgeistpm/ui.git .

# Increase memory available to Node.js process
ENV NODE_OPTIONS="--max-old-space-size=4096"

# Install dependencies
RUN yarn install

# Build the Next.js app
# RUN yarn build:local

# Set the command to start the Next.js app
# CMD ["yarn", "start"]
CMD ["yarn", "dev:local"]