diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..41cb20a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,27 @@ +# Editor stuff +.vscode + +# Test stuff +test +coverage +.nyc_output +src/lib/utils/saved_requests/files + +# Database stuff +db +*.log +*.csv + +# Personal stuff +notes.txt +config.js + +# Cached stuff +db +node_modules + +# Stuff Docker doesn't need +.git +art +*.log +*.csv diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..54fd70f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:14.5.0-alpine as build +RUN apk --no-cache add git python3 make g++ +WORKDIR /app +COPY . . +COPY ./.config.js.default ./config.js +RUN npm install --no-optional + +FROM node:14.5.0-alpine as app +WORKDIR /app +COPY --from=build /app /app +RUN apk add --no-cache graphicsmagick +EXPOSE 10407 +CMD ["npm", "start"] diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..c76e14e --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: npm run $(test "$BIBLIOGRAM_ENTRY" = 'assistant' && echo 'assistant' || echo 'start') diff --git a/app.json b/app.json new file mode 100644 index 0000000..ff9c9a0 --- /dev/null +++ b/app.json @@ -0,0 +1,6 @@ +{ + "name": "Bibliogram", + "description": "An alternative front-end for Instagram.", + "repository": "https://git.sr.ht/~cadence/bibliogram", + "logo": "https://bibliogram.art/android-chrome-192x192.png" +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f1fa818 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' +volumes: + db: +services: + bibliogram: + build: . + image: cloudrac3r/bibliogram + volumes: + - db:/app/db + ports: + - 10407:10407 + restart: unless-stopped