Skip to content

Commit

Permalink
Base app (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanmani1122 authored Nov 14, 2024
1 parent 09b2a73 commit 94ccd09
Show file tree
Hide file tree
Showing 27 changed files with 4,151 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tools-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
env:
REGISTRY: ghcr.io

jobs:
build:
permissions:
contents: read
packages: write

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.BRANCH_NAME }}

- name: Generate Timestamp
run: |
echo "TIMESTAMP=$(date '+%s')" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}

- name: Build and Push image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: '${{ env.REGISTRY }}/agoric/tools-app:${{ env.TIMESTAMP }}'
build-args: |
TAG=${{ env.TIMESTAMP }}
name: Create Tools Docker Image

on:
workflow_dispatch:
inputs:
BRANCH_NAME:
default: main
description: Branch to build the image from
required: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.next
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20

WORKDIR /app

COPY . .

RUN <<-EOF
#!/bin/bash

set -o errexit -o nounset -o xtrace

yarn install
yarn build
EOF

ENV PORT=3000

EXPOSE $PORT

ENTRYPOINT [ "yarn", "start" ]
Loading

0 comments on commit 94ccd09

Please sign in to comment.