Update README.md on docker selfhost commands (#42)
Some checks failed
Build Docker Image / build-and-push (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
Run Tests / test (push) Has been cancelled

* update README docker commands

* update README.md and docker-compose.yml reg user permissions.

* Note on deno user id

* add comment to `mkdir` and EOF diff fix
This commit is contained in:
Joel Godfrey 2025-02-12 20:22:31 +05:30 committed by GitHub
parent 2e995cc9f7
commit 581ff2ccc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -19,8 +19,10 @@ Or on your own machine:
Download/copy [`docker-compose.yml`](/docker-compose.yml) and [`.env.sample`](/.env.sample) as `.env`.
```sh
$ docker compose up # makes the app available at http://localhost:8000
$ docker compose run website bash -c "cd /app && make migrate-db" # initializes/updates the database (only needs to be executed the first time and on any updates)
$ mkdir data-files # local directory for storing user-uploaded files
$ chown -R 1993:1993 data-files # solves permission related issues
$ docker compose up -d # makes the app available at http://localhost:8000
$ docker compose run --rm website bash -c "cd /app && make migrate-db" # initializes/updates the database (only needs to be executed the first time and on any updates)
```
Alternatively, check the [Development section below](#development).
@ -28,6 +30,9 @@ Alternatively, check the [Development section below](#development).
> [!IMPORTANT]
> Even with signups disabled (`CONFIG_ALLOW_SIGNUPS="false"`), the first signup will work and become an admin.
> [!NOTE]
> `1993:1993` comes from deno's [docker image](https://github.com/denoland/deno_docker/blob/2abfe921484bdc79d11c7187a9d7b59537457c31/ubuntu.dockerfile#L20-L22) where `1993` is the default user id in it.
## Development
### Requirements

View file

@ -5,7 +5,6 @@ services:
ports:
- 127.0.0.1:8000:8000
mem_limit: '256m'
user: '${UID}:${GID}' # if you run into issues with permissions for the data-files volume below, see other options at https://stackoverflow.com/a/56904335
env_file:
- path: .env
required: true