Skip to content

Commit

Permalink
feat: add new frontend website (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
EehMauro authored Oct 22, 2024
1 parent 8de4ebf commit f389db1
Show file tree
Hide file tree
Showing 40 changed files with 8,358 additions and 40 deletions.
53 changes: 53 additions & 0 deletions docker/Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM --platform=linux/amd64 ubuntu:20.04 AS build

ARG GODOT_VERSION="4.3"

USER root

RUN mkdir -p /visualizer/build \
&& mkdir -p /root/.cache \
&& mkdir -p /root/.config/godot \
&& mkdir -p /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable \
&& chown root:root /visualizer/build \
&& chown root:root /root/.cache \
&& chown root:root /root/.config/godot \
&& chown root:root /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git \
python \
python-openssl \
unzip \
wget \
zip \
nano \
p7zip-full \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip -q \
&& wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz -q \
&& unzip Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip \
&& mv Godot_v${GODOT_VERSION}-stable_linux.x86_64 /usr/local/bin/godot \
&& unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mv templates/* /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable \
&& rm -f Godot_v${GODOT_VERSION}-stable_export_templates.tpz Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip

WORKDIR /visualizer

COPY ./godot-visualizer ./
RUN godot --headless --export-release "Web" ./build/index.html

FROM node:20-alpine

WORKDIR /app

COPY --from=build /visualizer/build ./public/visualizer

COPY ./frontend/package*.json ./
RUN npm install

COPY ./frontend ./
RUN npm run build

CMD ["npm", "start"]
38 changes: 38 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

public/visualizer/*
6 changes: 6 additions & 0 deletions frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
9 changes: 9 additions & 0 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const withMDX = require('@next/mdx')()

/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
transpilePackages: ['next-mdx-remote'],
}

module.exports = withMDX(nextConfig)
Loading

0 comments on commit f389db1

Please sign in to comment.