liljudd-website/Dockerfile
moonleay 1a43d8d5a3
Merged previous state
big bang v2?

feat: finished with html (pretty much) started with css

fix: fixed issues with the footer

feat: added basic responsive design

chore: moved to pnpm, improved footer

feat: kinda finished homepage

Init astro

Add prettier

Add import pahts

Migrate Layout

Move Files to new location

Move Layout style

Migrate Components

Migrate all routes

Added sass and migrated styles

fix: moved scss and css to seperate file, fixed overflow
chore: added folders to gitignore

Signed-off-by: moonleay <contact@moonleay.net>

feat: copyright notice now shows its clickableness

chore: merged chore/fix-astro into master

Add astro dependencies for build

WIP: temp commit in case my laptop explodes

WIP: fixed typos, added links, added text to about

WIP: continued work on the feature page

WIP: changes

Chore: grid on features page

WIP: further improvement of features page

WIP: added CSS to how-do-i page, stack page, edited about page, edited links in footer, edited invite-link in header

WIP: removed bg image from feature page

WIP: improved css all around, started fixing features page

fix: features page

WIP: fixed typos on about page, wrapped acknowledgements with div, fixed typo in features, added new line in how-do-i footer, edited imprint formatting, updated privacy-policy and terms-of-service, updated about page css, styled acknowledgements page, added color to links on contact page, edited how-do-i style, added css to imprint, added css to privacy-policy, edited style of the stack page, added css to terms-of-service page

feat: added docker support

fix: centered image on stack page

feat: added support server to contact page

chore: edit privacy-policy formatting

feat: added Discord Support server link into footer

feat: made mobile screenshots appear on the mobile how-do-i page

fix: fixed features page overflowing on chrome

chore: bump version

feat: improve footer

Moved files to prepare for solid-start migration

chore: squashed some commits, which are not for public viewing
fix: fixed ImageSection being broken on mobile
feat: added proper imprint
feat: added name to privacy-policy
feat: bump version
fix: fixed footer not rendering correct on some mobile devices
chore: bump version
feat: imported html from Config repo
Updated packages
Migration from astro to solid-start
Add database and auth
Add discord rest testing
Database schema rework
API meeting progress
Fix styles

Add docker

Add local assets

Improved docker workflow

feat: added styling to config page

Fix: schema, move favicon and config page

Update solid-start

style: login and config working

feat: complete last commit

chore: Create Readme
2024-01-20 19:15:45 +01:00

51 lines
1.6 KiB
Docker

# Use the desired base image
FROM node:21-alpine AS base
# Set the NODE_ENV to production
ENV NODE_ENV production
# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
# Pass the Font Awesome token as a build argument
ARG FONT_AWESOME_TOKEN
RUN echo "@fortawesome:registry=https://npm.fontawesome.com/" > ~/.npmrc \
&& echo "//npm.fontawesome.com/:_authToken=${FONT_AWESOME_TOKEN}" >> ~/.npmrc \
&& if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 solidjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=solidjs:nodejs /app/.output ./.output
COPY --from=builder --chown=solidjs:nodejs /app/.vinxi ./.vinxi
USER solidjs
EXPOSE 3000
# Set the default values for environment variables
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
CMD ["node", ".output/server/index.mjs"]