mirror of
https://github.com/brufdev/many-notes.git
synced 2026-04-29 05:49:10 -05:00
Improve installation guide
This commit is contained in:
@@ -36,68 +36,48 @@ Vaults are simply storage containers for your files, and Many Notes lets you cho
|
||||
- **Light/dark theme**: Automatically selected based on your OS setting
|
||||
- **Mobile friendly**: Provides a similar experience to the desktop
|
||||
|
||||
## Installation (Docker)
|
||||
## Installation
|
||||
|
||||
There are three methods to install Many Notes:
|
||||
|
||||
- Docker with volumes, if you prefer a simpler installation (read below)
|
||||
- Docker with bind mounts, if you prefer easy access to the shared paths from the host [(read here)](docs/installation/docker-bind-mounts.md)
|
||||
- Non-Docker installation, if you prefer a more manual approach [(read here)](docs/installation/non-docker.md)
|
||||
|
||||
### Docker with volumes
|
||||
|
||||
**Read the [upgrading guide](UPGRADING.md) if you are upgrading from a previous version.**
|
||||
|
||||
First, create a new directory called `many-notes` with the following structure:
|
||||
|
||||
```
|
||||
many-notes/
|
||||
├── database/
|
||||
├── storage-logs/
|
||||
├── storage-private/
|
||||
├── storage-public/
|
||||
├── storage-sessions/
|
||||
├── compose.yaml
|
||||
└── Dockerfile
|
||||
```
|
||||
|
||||
Next, add this to the `Dockerfile` file:
|
||||
|
||||
```Dockerfile
|
||||
FROM brufdev/many-notes:latest
|
||||
USER root
|
||||
ARG UID
|
||||
ARG GID
|
||||
RUN docker-php-serversideup-set-id www-data $UID:$GID && \
|
||||
docker-php-serversideup-set-file-permissions --owner $UID:$GID --service nginx
|
||||
USER www-data
|
||||
```
|
||||
|
||||
Finally, add this to the `compose.yaml` file:
|
||||
Create a `compose.yaml` file with:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
UID: USER_ID # change id
|
||||
GID: GROUP_ID # change id
|
||||
image: brufdev/many-notes:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./database:/var/www/html/database/sqlite
|
||||
- ./storage-logs:/var/www/html/storage/logs
|
||||
- ./storage-private:/var/www/html/storage/app/private
|
||||
- ./storage-public:/var/www/html/storage/app/public
|
||||
- ./storage-sessions:/var/www/html/storage/framework/sessions
|
||||
- database:/var/www/html/database/sqlite
|
||||
- storage-logs:/var/www/html/storage/logs
|
||||
- storage-private:/var/www/html/storage/app/private
|
||||
- storage-public:/var/www/html/storage/app/public
|
||||
- storage-sessions:/var/www/html/storage/framework/sessions
|
||||
ports:
|
||||
- 80:8080
|
||||
|
||||
volumes:
|
||||
database:
|
||||
storage-logs:
|
||||
storage-private:
|
||||
storage-public:
|
||||
storage-sessions:
|
||||
```
|
||||
|
||||
Many Notes must have the necessary permissions to access the shared paths. Since this image runs with an unprivileged user, the host user IDs must be added during the build phase. Make sure to update the IDs to match the host user IDs. Feel free to change anything else if you know what you're doing, and read the customization section below before continue. Then run:
|
||||
Feel free to change anything else if you know what you're doing, and read the customization section below before continue. Then run:
|
||||
|
||||
```shell
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Installation (non-Docker)
|
||||
|
||||
**Read the [upgrading guide](UPGRADING.md) if you are upgrading from a previous version.**
|
||||
|
||||
The Docker method is recommended because it is faster and simpler to set up. However, if you prefer a non-Docker installation, please refer to this [guide](docs/installation/non-docker.md) for step-by-step instructions.
|
||||
|
||||
## Customization
|
||||
|
||||
To customize Many Notes, add environment variables to the `compose.yaml` file if using the Docker installation. If you chose the non-Docker installation, you should add the environment variables to a `.env` file instead.
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Installation guide (Docker with bind mounts)
|
||||
|
||||
**Read the [upgrading guide](../../UPGRADING.md) if you are upgrading from a previous version.**
|
||||
|
||||
Many Notes must have the necessary permissions to access the shared paths. Since this image runs with an unprivileged user, the host user IDs must be added during the build phase.
|
||||
|
||||
## Instructions
|
||||
|
||||
First, create a new directory called `many-notes` with the following structure:
|
||||
|
||||
```
|
||||
many-notes/
|
||||
├── database/
|
||||
├── storage-logs/
|
||||
├── storage-private/
|
||||
├── storage-public/
|
||||
├── storage-sessions/
|
||||
├── compose.yaml
|
||||
└── Dockerfile
|
||||
```
|
||||
|
||||
Next, add this to the `Dockerfile` file:
|
||||
|
||||
```Dockerfile
|
||||
FROM brufdev/many-notes:latest
|
||||
USER root
|
||||
ARG UID
|
||||
ARG GID
|
||||
RUN docker-php-serversideup-set-id www-data $UID:$GID && \
|
||||
docker-php-serversideup-set-file-permissions --owner $UID:$GID --service nginx
|
||||
USER www-data
|
||||
```
|
||||
|
||||
Finally, add this to the `compose.yaml` file:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
UID: USER_ID # change id
|
||||
GID: GROUP_ID # change id
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./database:/var/www/html/database/sqlite
|
||||
- ./storage-logs:/var/www/html/storage/logs
|
||||
- ./storage-private:/var/www/html/storage/app/private
|
||||
- ./storage-public:/var/www/html/storage/app/public
|
||||
- ./storage-sessions:/var/www/html/storage/framework/sessions
|
||||
ports:
|
||||
- 80:8080
|
||||
```
|
||||
|
||||
Make sure to update the IDs to match the host user IDs. Feel free to change anything else if you know what you're doing, and read the [customization section](../../README.md#customization) before continuing. Then run:
|
||||
|
||||
```shell
|
||||
docker compose up -d
|
||||
```
|
||||
@@ -1,6 +1,8 @@
|
||||
# Installation guide
|
||||
# Installation guide (non-Docker)
|
||||
|
||||
Here are the full instructions for a non-Docker installation.
|
||||
**Read the [upgrading guide](../../UPGRADING.md) if you are upgrading from a previous version.**
|
||||
|
||||
The Docker method is recommended because it is faster and simpler to set up. However, if you prefer a non-Docker installation, here are the full instructions.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -73,3 +75,5 @@ Run the upgrade command
|
||||
```shell
|
||||
php artisan upgrade:run
|
||||
```
|
||||
|
||||
The way to customize Many Notes in a non-Docker installation is to add/update the variables in the `.env` file at the root of the project. The only exception is customizing the upload size limit, which needs to be changed in your PHP settings. Read the [customization section](../../README.md#customization) before continuing.
|
||||
|
||||
Reference in New Issue
Block a user