add fly deploy stuff and update layout

This commit is contained in:
2024-12-06 23:31:45 +00:00
parent 213094ee93
commit 78e2e3cd3d
7 changed files with 99 additions and 19 deletions

24
.dockerignore Normal file
View File

@@ -0,0 +1,24 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
# jetbrains setting folder
.idea/

46
Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
# syntax = docker/dockerfile:1
# Adjust BUN_VERSION as desired
ARG BUN_VERSION=1.1.38
FROM oven/bun:${BUN_VERSION}-slim as base
LABEL fly_launch_runtime="Bun"
# Bun app lives here
WORKDIR /app
# Set production environment
ENV NODE_ENV="production"
# Throw-away build stage to reduce size of final image
FROM base as build
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3
# Install node modules
COPY bun.lockb package.json ./
RUN bun install
# Copy application code
COPY . .
# Build application
RUN bun --bun run build
# Remove development dependencies
RUN rm -rf node_modules && \
bun install --ci
# Final stage for app image
FROM nginx
# Copy built application
COPY --from=build /app/dist /usr/share/nginx/html
# Start the server by default, this can be overwritten at runtime
EXPOSE 80
CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ]

BIN
bun.lockb

Binary file not shown.

22
fly.toml Normal file
View File

@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for athen-lab-website on 2024-12-06T23:12:45Z
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'athen-lab-website'
primary_region = 'lhr'
[build]
[http_service]
internal_port = 80
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1

View File

@@ -17,6 +17,7 @@
"tailwindcss": "^3.4.16"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.5.9",
"@tailwindcss/typography": "^0.5.15"
}
}

View File

@@ -1,11 +0,0 @@
<svg class="fill-current text-neutral-100" width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2_13)">
<rect y="39" width="90" height="122" rx="45" fill="currentColor"/>
<rect x="110" width="90" height="200" rx="45" fill="currentColor"/>
</g>
<defs>
<clipPath id="clip0_2_13">
<rect width="200" height="200" fill="currentColor"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 0 B

View File

@@ -11,18 +11,16 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
<head>
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
</head>
<body class="bg-neutral-100 dark:bg-neutral-950 dark:text-neutral-100 flex flex-col items-center px-8">
<header class="flex flex-row items-center space-x-3 w-full md:max-w-xl mt-60 mb-10">
<body class="h-screen bg-neutral-100 dark:bg-neutral-950 dark:text-neutral-100 flex flex-col justify-center items-center px-8">
<header class="flex flex-row items-center space-x-3 w-full md:max-w-xl mb-10">
<Logo />
<span class="font-bold text-xl">Athen Lab</span>
</header>
<main class="flex flex-col flex-1 w-full md:max-w-xl text-xl space-y-4">
<p>Athen Lab is an independent lab that conducts open-source machine learning research.</p>
<main class="flex flex-col w-full md:max-w-xl text-xl space-y-4">
<p>Athen Lab is an independent machine learning research lab. We believe that AI should be open source and widely available.</p>
<p>The current research is to build a state-of-the-art AI image detector.</p>
<p><a class="underline" href="https://x.com/kennethnym">Find me on x.com</a> to follow the research.<p>
<hr class="opacity-50" />
<p class="text-xs opacity-50">Founded by <a class="underline" href="https://kennethnym.com">Kenneth</a>. Find me on <a class="underline" href="https://x.com/kennethnym">x.com</a>.</p>
</main>
<footer class="absolute bottom-0 left-0 right-0 flex items-center justify-center opacity-20 mb-10">
<p class="text-xs">Created by <a class="underline" href="https://kennethnym.com">kennethnmym</a></p>
</footer>
</body>
</html>