mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
feat(docker): allow to easily run with docker-compose
This commit is contained in:
parent
f334e78ed6
commit
1bc0d16948
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
10
compose.yml
Normal 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
|
||||||
@ -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
1
public/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*
|
||||||
@ -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")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user