Skip to content

Commit

Permalink
Initial Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
theted committed Jul 16, 2023
1 parent 73a450e commit 424debf
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 59 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:18
ENV DEVELOPMENT production
WORKDIR /app
RUN npm install -g ts-node
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build-css
RUN npm run build-only
EXPOSE 5174
CMD [ "ts-node", "./server.ts" ]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,23 @@ npm install
npm run dev
```

## Start backend server in development
```sh
npx nodemon server.ts
```

## Build css

```sh
npx tailwindcss -i ./src/input.css -o ./src/assets/output.css --watch
```

## Build & run Docker image
```sh
docker build -t habit-tracker .
docker run -it -p 3000:3000 habit-tracker
```

### Type-Check, Compile and Minify for Production

```sh
Expand Down
Loading

0 comments on commit 424debf

Please sign in to comment.