Add dockerfile + compose, update readme
This commit is contained in:
parent
f409da325a
commit
ab360946a3
|
@ -0,0 +1,14 @@
|
|||
FROM node:18
|
||||
WORKDIR /src
|
||||
|
||||
# Copy source
|
||||
COPY . /src
|
||||
|
||||
# Install npm packages
|
||||
RUN /bin/bash -c "npm i"
|
||||
|
||||
# Build project
|
||||
RUN /bin/bash -c "npm run build"
|
||||
|
||||
# Serve project
|
||||
CMD node build
|
13
README.md
13
README.md
|
@ -4,7 +4,7 @@
|
|||
|
||||
A portfolio made with SvelteKit, TailwindCSS, and DaisyUI.
|
||||
|
||||
## Building
|
||||
## Building manually
|
||||
|
||||
```bash
|
||||
# install dependencies
|
||||
|
@ -18,6 +18,17 @@ $ npm run build
|
|||
$ node build
|
||||
```
|
||||
|
||||
## Building with docker (compose)
|
||||
|
||||
```bash
|
||||
# Build + run the dockerfile while publishing port 3000
|
||||
$ docker build -t portfolio2023 .
|
||||
$ docker run -p 3000:3000 portfolio2023
|
||||
|
||||
# Or, just use the docker-compose file
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
## Adding a project
|
||||
|
||||
Create a new `[slug].md` file in `src/routes/projects`, following the template:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
portfolio2023:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
restart: always
|
Loading…
Reference in New Issue