Skip to content

Commit

Permalink
Merge pull request #1 from penumbra-zone/project-instantiation
Browse files Browse the repository at this point in the history
Project instantiation
  • Loading branch information
philipjames44 authored Feb 27, 2024
2 parents 12d2c22 + 2c23a6c commit d62d2ad
Show file tree
Hide file tree
Showing 23 changed files with 5,669 additions and 13 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
44 changes: 31 additions & 13 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
FROM docker.io/debian:bookworm-slim
LABEL maintainer="team@penumbralabs.xyz"

# Initial packages for dummy container
RUN apt-get update && apt-get install -y \
python3 \
curl \
jq
# Install curl and gnupg for Node.js installation
RUN apt-get update && apt-get install -y curl gnupg

# Copy only the .nvmrc file to use the specified Node.js version
COPY .nvmrc .

# Use the version specified in .nvmrc to install Node.js
RUN curl -sL https://deb.nodesource.com/setup_$(cat .nvmrc | xargs).x | bash - && \
apt-get install -y nodejs

# Install Yarn
RUN npm install -g yarn

# Set the project directory
WORKDIR /home/penumbra/dex-explorer

# Copy the rest of the project files
COPY . .

# Configure registry
RUN npm config set @buf:registry https://buf.build/gen/npm/v1/

# Install dependencies
RUN npm install

# Normal user settings
ARG USERNAME=penumbra
ARG UID=1000
ARG GID=1000
RUN groupadd --gid ${GID} ${USERNAME} \
&& useradd -m -d /home/${USERNAME} -g ${GID} -u ${UID} ${USERNAME}
RUN groupadd --gid ${GID} ${USERNAME} && \
useradd -m -d /home/${USERNAME} -g ${GID} -u ${UID} ${USERNAME} && \
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}


# Create an example docroot, so we can verify deployment is working.
RUN mkdir -p /home/${USERNAME}/docroot && bash -c "echo 'Hello, world!' > /home/${USERNAME}/docroot/index.html"
WORKDIR /home/${USERNAME}/docroot
USER ${USERNAME}
EXPOSE 8000
CMD [ "python3", "-m", "http.server" ]
EXPOSE 3000

# Start the app
CMD ["yarn", "dev"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ several times per day, and generally has less information on its chain.
## Name

It'd be nice to have a cool name for the DEX explorer. We don't have one yet.


## Proto Generation
Using https://buf.build/penumbra-zone/penumbra/sdks/main
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit d62d2ad

Please sign in to comment.