Skip to content

Commit

Permalink
Update documention
Browse files Browse the repository at this point in the history
  • Loading branch information
leepeuker committed Feb 1, 2025
1 parent 300b92e commit 35e6bd2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ db_migration_create:
app_sync_all: app_sync_trakt app_sync_tmdb

app_database_migrate:
make exec_app_cmd CMD="php bin/console.php database:migration:migrate "
make exec_app_cmd CMD="php bin/console.php database:migration:migrate"

app_database_rollback:
make exec_app_cmd CMD="php bin/console.php database:migration:rollback"
Expand Down
15 changes: 8 additions & 7 deletions docs/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

It is recommended to host Movary with the [official Docker image](https://hub.docker.com/r/leepeuker/movary).

The official docker image extends the `webdevops/php-nginx` image, checkout
their [docs](https://dockerfile.readthedocs.io/en/latest/content/DockerImages/dockerfiles/php-nginx.html) for more configuration information.
The official docker image extends the `TrafeX/docker-php-nginx` image, checkout
their [docs](https://github.com/TrafeX/docker-php-nginx) for more configuration information.

!!! danger
!!! warning

After the **initial installation** and after **each image update** execute the database migrations, example:
After the **initial installation** and every update containing database changes the database migrations must be executed:

`docker exec movary php bin/console.php database:migration:migrate`
`php bin/console.php database:migration:migrate`

Missing database migrations can cause criticatal errors!

!!! info

The docker images automatically try to run the missing database migrations on start up.
The docker images automatically runs the missing database migrations on start up.
To stop this behavior set the environment variable `DATABASE_DISABLE_AUTO_MIGRATION=0`

## Image tags

Expand All @@ -33,7 +34,7 @@ The easiest way to do this are managed docker volumes (used in the examples belo
!!! info

If you bind a local mount, make sure the directory exists before you start the container
and that it has the necessary permissions/ownership.
and that it has the necessary permissions/ownership (3000:3000 on default).

## Docker secrets

Expand Down
45 changes: 36 additions & 9 deletions docs/install/manual.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
## System requirements

- PHP 8.2
- PHP 8.4 (FPM) + extensions:
- php84-pdo
- php84-pdo_mysql
- php84-pdo_sqlite
- php84-mbstring
- php84-sqlite3
- php84-simplexml
- php84-pecl-imagick
- git
- composer
- web server
- supervisor (optional but recommended)
- [composer](https://getcomposer.org)
- web server (e.g. nginx)
- supervisor or cron for job processing

## Setup

Expand All @@ -15,31 +22,42 @@
git clone https://github.com/leepeuker/movary.git .
```

2. Install composer dependencies (execute after every update)
2. Install composer dependencies (recommended to install after every update)
```
composer install --no-dev
```

3. Create (and edit) your environment configuration
```
cp .env.production.example .env
cp .env.example .env
```

4. Create necessary symlink between the storage and public/storage
```
php bin/console.php storage:link
```

5. Run the database migrations
```
php bin/console.php database:migration:migrate
```

!!! Info

Make sure that the permissions on the `storage` directory are correct and set to writable for the application user
Make sure that the permissions on the `storage` directory are correct and set to writable for the php (fpm) user

### Web server

Use the `public` directory as the document root

### Supervisor
Use supervisor to continuously process jobs/events created by the application.
### Job processing

The `jobs:process` cli command has to be executed to keep the Movary data up to date and process all background jobs.

Here are two recommanded ways.

#### Supervisor
Supervisor manages a process to execute the cli command contentiously.

Example config:

Expand All @@ -57,3 +75,12 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
```

#### Cron
Use a cronjob to process jobs in at least 1 minute intervals.

Example config:

```
* * * * * usr/local/bin/php /app/bin/console.php jobs:process
```

0 comments on commit 35e6bd2

Please sign in to comment.