Skip to content

Commit

Permalink
🔨 Fix the path problem of database files in the image.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 11, 2024
1 parent 29f6978 commit d3260c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ script = '''
#!@duckscript
exec docker build -t ciallo-0721 .
exec docker run -d -p 8080:80 -v 0721-cache:/home/cache -e JWT_SECRET=ciallo@0721 --restart=always ciallo-0721:latest
exec docker run -p 8080:80 --rm -v 0721-cache:/home/cache -e JWT_SECRET=ciallo@0721 ciallo-0721:latest
'''

[tasks.clean]
Expand Down
10 changes: 10 additions & 0 deletions packages/database/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ cfg_if::cfg_if! {
std::fs::create_dir_all(&pwd).map_err(
|err| anyhow::anyhow!("Failed to create directory: {}", err)
)?;
} else {
std::fs::create_dir_all("/home/cache/sql").map_err(
|err| anyhow::anyhow!("Failed to create directory: {}", err)
)?;
std::fs::create_dir_all("/home/cache/kv").map_err(
|err| anyhow::anyhow!("Failed to create directory: {}", err)
)?;
std::fs::create_dir_all("/home/cache/bucket").map_err(
|err| anyhow::anyhow!("Failed to create directory: {}", err)
)?;
}

match param {
Expand Down

0 comments on commit d3260c9

Please sign in to comment.