mirror of
https://github.com/zyachel/quetre.git
synced 2025-04-01 20:17:36 +03:00
feat: add docker support with redis(#118)
This commit is contained in:
parent
fff9f9b1aa
commit
2320c6c4d5
2 changed files with 31 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal 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
20
docker-compose.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue