feat: add docker support with redis(#118)

This commit is contained in:
drgns-wtd 2023-10-14 12:03:51 +00:00 committed by GitHub
parent fff9f9b1aa
commit 2320c6c4d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM node:alpine3.17
WORKDIR /app
RUN apk update && apk add git
RUN git clone https://github.com/zyachel/quetre .
RUN npm i -g pnpm
RUN pnpm install
EXPOSE 3000
CMD ["pnpm", "start"]

20
docker-compose.yml Normal file
View file

@ -0,0 +1,20 @@
version: '3'
services:
quetre:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
environment:
- "NODE_ENV=production"
- "PORT=3000"
- "CACHE_PERIOD=1h"
- "REDIS_URL=redis:6379" # optional
- "REDIS_TTL=3600"
redis:
image: docker.io/redis:alpine
container_name: redis
restart: unless-stopped