Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dockerignore

This file was deleted.

2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# No environment variables required for SQLite storage
# Database is stored at /data/eatit.db
2 changes: 2 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# No environment variables required for SQLite storage
# Database is stored at /data/eatit.db
88 changes: 31 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,67 +1,41 @@
node_modules/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# Generated files
.idea/**/contentModel.xml
# testing
/coverage

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# next.js
/.next/
/out/

# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# production
/build

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# misc
.DS_Store
*.pem

# CMake
cmake-build-*/
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# local env files
.env*.local

# File-based project format
*.iws
# vercel
.vercel

# IntelliJ
out/
# typescript
*.tsbuildinfo
next-env.d.ts

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# SQLite database files
/data/*.db
/data/*.db-shm
/data/*.db-wal
18 changes: 0 additions & 18 deletions .meteor/.finished-upgraders

This file was deleted.

1 change: 0 additions & 1 deletion .meteor/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions .meteor/.id

This file was deleted.

24 changes: 0 additions & 24 deletions .meteor/packages

This file was deleted.

2 changes: 0 additions & 2 deletions .meteor/platforms

This file was deleted.

1 change: 0 additions & 1 deletion .meteor/release

This file was deleted.

82 changes: 0 additions & 82 deletions .meteor/versions

This file was deleted.

12 changes: 0 additions & 12 deletions .prettierrc

This file was deleted.

75 changes: 22 additions & 53 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,65 +1,34 @@
# Dockerfile for EatIT in production
FROM debian:bookworm AS buildStage
MAINTAINER digIT <digit@chalmers.it>
FROM node:25-alpine AS builder

ENV METEOR_VERSION 1.6.1

# Setup directories and user
RUN mkdir /app && mkdir /output && \
groupadd -r meteor && useradd -m -g meteor meteor
WORKDIR /app

# Install prerequisites
RUN apt-get update && apt-get install -y \
curl git

# Copy Source files
COPY . .

# Change ownership and su unprivileged user
RUN chown -R meteor:meteor /app && chown -R meteor /output
USER meteor:meteor
# Copy package files
COPY package*.json ./
COPY pnpm-lock.yaml ./

# Install meteor
RUN curl https://install.meteor.com/?release=$METEOR_VERSION | sh
USER root:root
RUN cp /home/meteor/.meteor/packages/meteor-tool/$METEOR_VERSION/mt-os.linux.x86_64/scripts/admin/launch-meteor /usr/bin/meteor
USER meteor:meteor

# Build and extract app
RUN meteor npm install
RUN meteor build /output
WORKDIR /output
RUN tar -zxf app.tar.gz && rm app.tar.gz
# Install dependencies
RUN npm install -g pnpm
RUN pnpm i --frozen-lockfile

# Copy application files
COPY . .

##########################
# PRODUCTION STAGE #
##########################
FROM node:9.1.0 AS production
MAINTAINER digIT <digit@chalmers.it>
# Build the application
RUN pnpm run build

# Build arguments
ARG port=8080
# Production stage
FROM node:25-alpine

# Copy files from the build stage
COPY --from=buildStage /output /app
WORKDIR /app

# Setup and su as unprivileged user
RUN chown -R node:node /app
USER node:node
# Copy built application
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public

# Install the application
WORKDIR /app/bundle/programs/server
RUN npm install
ENV NODE_ENV=production
ENV PORT=3000

# Setup environment
ENV MONGO_URL mongodb://user:password@host:port/databasename
ENV ROOT_URL https://example.com
ENV MAIL_URL smtp://user:password@mailhost:port
ENV PORT $port
EXPOSE $port
EXPOSE 3000

# Provide default command and entrypoint
WORKDIR /app/bundle
CMD node main.js
CMD ["node", "server.js"]
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading
Loading