Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github
.next
.husky
node_modules
postgres-data
.env
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ EMAIL_SERVER_PASSWORD=
EMAIL_SERVER_HOST=
EMAIL_SERVER_PORT=
EMAIL_FROM=
JOIN_ANONYMOUSLY=false # default falses#
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json /app
RUN npm install --save
COPY . /app
ENV DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
ENV NEXTAUTH_URL="http://mock"
ENV NEXTAUTH_SECRET="MOCK"
RUN npx prisma generate
RUN npm run build
EXPOSE 3000

CMD /bin/sh -c 'npx prisma migrate deploy && npm run start'
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3"
services:
meetpostgres:
image: postgres:alpine
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data
parachute:
build: .
restart: unless-stopped
depends_on:
- meetpostgres

environment:
- DATABASE_URL=postgres://postgres:postgres@meetpostgres:5432/postgres
- NEXTAUTH_SECRET= # DO openssl rand -base64 172 | tr -d '\n'
- JOIN_ANONYMOUSLY=true
- NEXTAUTH_URL=http://localhost:3000
- PROVIDER=postgresql
ports:
- "3000:3000"
Loading