Skip to content

Commit

Permalink
feat(server): add simple server for deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
thatkookooguy committed Nov 17, 2024
1 parent 5fe1cf7 commit 6919708
Show file tree
Hide file tree
Showing 8 changed files with 4,181 additions and 0 deletions.
1 change: 1 addition & 0 deletions simple-server/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Binary file added simple-server/Comfortaa-Regular.ttf
Binary file not shown.
40 changes: 40 additions & 0 deletions simple-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Use a Node.js base image
FROM node:20

# Set the working directory inside the container
WORKDIR /usr/src/app

# Install Chromium dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2 \
libdbus-1-3 \
libgbm1 \
libnspr4 \
libnss3 \
libxcomposite1 \
libxrandr2 \
xdg-utils \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Puppeteer and its dependencies
RUN npm install puppeteer

# Copy the application files to the container
COPY package*.json ./
COPY . .

# Install application dependencies
RUN npm install

# Expose the API port
EXPOSE 3000

# Run the server
CMD ["node", "dist/simple-server.js"]
Loading

0 comments on commit 6919708

Please sign in to comment.