Skip to content

Commit

Permalink
add docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
finxol committed Sep 11, 2022
1 parent 67db88e commit b3f50f5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dockerfile
FROM node:16-alpine

# create destination directory
RUN mkdir -p /usr/src/unicovoit-bot
WORKDIR /usr/src/unicovoit-bot

RUN npm install -g pnpm clean-modules

# copy the app, note .dockerignore
COPY package.json /usr/src/univovoit-bot
COPY . /usr/src/unicovoit-bot
RUN pnpm install

RUN apk --no-cache add dumb-init

USER node

CMD ["dumb-init", "node", "--max-old-space-size=2048", "src/index.js"]
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'

services:
unicovoit-bot:
image: unicovoit-bot:latest
container_name: unicovoit-bot
restart: always
env_file:
- .env

0 comments on commit b3f50f5

Please sign in to comment.