feat(docker): allow to easily run with docker-compose

This commit is contained in:
Martin Kampas 2025-04-04 09:25:08 +02:00
parent f334e78ed6
commit 1bc0d16948
5 changed files with 13 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
.DS_Store .DS_Store
.gitignore .gitignore
node_modules node_modules
public
prof prof
tsconfig.tsbuildinfo tsconfig.tsbuildinfo
.obsidian .obsidian

10
compose.yml Normal file
View File

@ -0,0 +1,10 @@
services:
app:
build:
context: .
volumes:
- ./content:/usr/src/app/content
- ./public:/usr/src/app/public
ports:
- 8080:8080
- 3001:3001

View File

@ -3,5 +3,5 @@ Quartz comes shipped with a Docker image that will allow you to preview your Qua
You can run the below one-liner to run Quartz in Docker. You can run the below one-liner to run Quartz in Docker.
```sh ```sh
docker run --rm -itp 8080:8080 -p 3001:3001 -v ./content:/usr/src/app/content $(docker build -q .) docker compose up
``` ```

1
public/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*

View File

@ -67,7 +67,7 @@ async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
const release = await mut.acquire() const release = await mut.acquire()
perf.addEvent("clean") perf.addEvent("clean")
await rimraf(path.join(output, "*"), { glob: true }) await rimraf(path.join(output, "!(.gitignore)"), { glob: true })
console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`) console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`)
perf.addEvent("glob") perf.addEvent("glob")