From 0e033348f09a473ca2dcdb48bff6efa9164b788a Mon Sep 17 00:00:00 2001 From: Sylvain Huguet Date: Tue, 2 Apr 2024 07:26:44 +0200 Subject: [PATCH] Fix permission errors when running Docker. Update Docker Compose & Docker instructions --- .dockerignore | 3 +-- .gitignore | 3 +-- README.md | 4 +++- docker-compose.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index 74df5ffb..3237992d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ .dockerignore Dockerfile node_modules -config -data \ No newline at end of file +puter \ No newline at end of file diff --git a/.gitignore b/.gitignore index f0e514d9..e23fb2d4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,4 @@ dist/ .env # this is for jetbrain IDEs .idea/ -config -data \ No newline at end of file +puter \ No newline at end of file diff --git a/README.md b/README.md index 501373f3..f1911b62 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,15 @@ This will launch Puter at http://localhost:4000 (or the next available port). ### Using Docker ```bash -docker run --rm -p 4100:4100 -v `pwd`/data:/opt/puter/app/volatile/runtime -v `pwd`/config:/opt/puter/app/volatile/config ghcr.io/heyputer/puter +mkdir puter && cd puter && mkdir config data && sudo chown -R 1000:1000 config data && docker run --rm -p 4100:4100 -v `pwd`/data:/opt/puter/app/volatile/runtime -v `pwd`/config:/opt/puter/app/volatile/config ghcr.io/heyputer/puter ``` ### Using Docker Compose ```bash mkdir puter && cd puter +mkdir data config +sudo chown -R 1000:1000 config data wget https://raw.githubusercontent.com/HeyPuter/puter/main/docker-compose.yml docker compose up ``` diff --git a/docker-compose.yml b/docker-compose.yml index 8b2ab579..d4749b0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,8 +15,8 @@ services: PUID: 1000 PGID: 1000 volumes: - - ./volatile/config:/opt/puter/app/volatile/config - - ./volatile/runtime:/opt/puter/app/volatile/runtime + - ./puter/config:/opt/puter/app/volatile/config + - ./puter/runtime:/opt/puter/app/volatile/runtime healthcheck: test: wget --no-verbose --tries=1 --spider http://puter.localhost:4100/test || exit 1 interval: 30s