Skip to content

Commit

Permalink
Bootstrap development environment with Docker Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
joonashak committed Sep 10, 2024
1 parent ac08ca4 commit 3d30d00
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# App image for use in development environment.
FROM node:20.17

# Install dependencies.
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm ci

COPY . .

# Start via Nest in development mode.
CMD npx nest start --watch --preserveWatchOutput
15 changes: 15 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Development environment
name: kaiku-dev

services:
app:
build:
context: app
dockerfile: Dockerfile.dev
ports:
- 3001:3001
environment:
NODE_ENV: development
PORT: 3001
volumes:
- ./app/src:/usr/src/app/src
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.0.1",
"description": "Kaiku Slackbot",
"scripts": {
"start": "docker compose up -d app",
"stop": "docker compose down",
"build": "docker compose build",
"postinstall": "cd app && npm ci",
"format:check": "prettier --check ."
},
Expand Down

0 comments on commit 3d30d00

Please sign in to comment.