init docker

This commit is contained in:
milanmdev 2023-01-14 15:22:40 -06:00
parent 539671ddc1
commit bbafc4d92a
6 changed files with 21 additions and 2 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
docker-compose.yml.example
.env

1
.env
View file

@ -1 +0,0 @@
ACCESS_TOKEN=GP8XOWUlK-DO5WNs9OsOkk92e0z-wRn7kSZZpP2pCKI

4
.gitignore vendored
View file

@ -101,4 +101,6 @@ dist
.dynamodb/
# TernJS port file
.tern-port
.tern-port
docker-compose.yml

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
FROM node:16-alpine
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
CMD yarn start

View file

@ -0,0 +1,8 @@
version: '3'
services:
verge_mastodon_bot:
restart: always
image: verge-mastodon-bot
environment:
- ACCESS_TOKEN=token
- NODE_ENV=production

View file

@ -6,6 +6,7 @@
"author": "Milan Mehra <milan@milanm.org>",
"license": "Apache-2.0",
"scripts": {
"build": "docker build . -t verge-mastodon-bot",
"start": "node index.js",
"pull": "git fetch origin && git reset --hard origin/main && yarn install"
},