Dockerize it

This commit is contained in:
Moritz Ruth 2023-04-26 21:44:53 +02:00
parent a63315e44c
commit d1482a2894
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
6 changed files with 685 additions and 592 deletions

6
.dockerignore Normal file
View file

@ -0,0 +1,6 @@
/node_modules/
/dist/
/run/
/.idea/
./src/server/.prisma
.env

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM node:18-alpine
WORKDIR /app
COPY . .
RUN npm install --global pnpm
RUN pnpm install --frozen-lockfile
RUN pnpm build:ui
RUN mkdir -p /data
RUN pnpm prisma generate
EXPOSE 4000
EXPOSE 3000
VOLUME /data
ENV DATABASE_FILE=file:/data/twentyone.db
ENTRYPOINT ["pnpm"]
CMD ["start:ui"]

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# TwentyOne
- return-opponent sollte am anfang nicht gehen
- krone und indikator überlagern

View file

@ -3,7 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"start:ui": "vite preview --host", "start:ui": "vite preview --host --port 4000",
"start:server": "NODE_ENV=production tsx ./src/server/main.ts",
"build:ui": "vite build", "build:ui": "vite build",
"dev:ui": "vite", "dev:ui": "vite",
"dev:server": "NODE_ENV=development tsx watch --clear-screen=false ./src/server/main.ts" "dev:server": "NODE_ENV=development tsx watch --clear-screen=false ./src/server/main.ts"

1247
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,3 @@
export const LOBBY_CODE_LENGTH = 5 export const LOBBY_CODE_LENGTH = 5
export const LOBBY_SIZE = 4 export const LOBBY_SIZE = 4
export const SPECIAL_CARD_PROBABILITY = 0.5 export const SPECIAL_CARD_PROBABILITY = 0.2