Skip to content

Commit

Permalink
Tweaked readme docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Jul 8, 2023
1 parent 5ac3623 commit cae843f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Control Center
Training Management System created by [Daniel L.](https://github.com/blt950) (1352906), [Gustav K.](https://github.com/gustavkauman) (1262761) and others from Web Department at VATSIM Scandinavia. Running using `Laravel 9` in a pre-packed Docker container.
Training Management System created by [Daniel L.](https://github.com/blt950) (1352906), [Gustav K.](https://github.com/gustavkauman) (1262761) and others from Web Department at VATSIM Scandinavia. Running using `Laravel 9` in a pre-built Docker container.

📝 The project is open source and contains some restirctions. Read the [LICENSE](LICENSE) for details.\
👁️ Remember to watch this repository to get notified of our patches and updates!
Expand All @@ -9,19 +9,18 @@ Training Management System created by [Daniel L.](https://github.com/blt950) (13
## Prerequisites

### Docker (Recommended)
- A Docker environment to deploy containers.
- MySQL database (or MariaDB) to store data.
- A Docker environment to deploy containers. We recommend [Portainer](https://www.portainer.io/).
- MySQL database to store data.
- Preferably a reverse proxy setup if you plan to host more than one website on the same server.

In the instructions where we use `docker exec`, we assume your container is named `control-center`. If you have named it differently, please replace this.

### Manual (Unsupported)
If you don't want to use Docker, you need:
- An environment that can host PHP websites, such as Apache, Ngnix or similar.
- MySQL database (or MariaDB) to store data.
- MySQL database to store data.
- Comply with [Laravel 9 Requirements](https://laravel.com/docs/9.x/deployment#server-requirements)

*Remember to build the composer, npm and setting up cron jobs and clearing all caches as well.*
- Manually build the composer, npm and setting up cron jobs and clearing all caches on updates.

## Setup and install

Expand All @@ -36,18 +35,18 @@ To setup your Docker instance simply follow these steps:
```sh
docker exec -it control-center php artisan migrate
```
6. To ensure that users will not need to log in after each time you re-deploy or upgrade the container, you need to create and store an application key in your environment.
6. To ensure that users will not need to log in after each time you re-deploy or upgrade the container, you need to create and store an application key in your environment and setup a shared volume.
```sh
docker exec -it control-center php artisan key:get
docker volume create controlcenter_sessions
```
Copy the key and set it as the `APP_KEY` environment variable in your Docker configuration.
7. Setup a crontab outside the container to run `* * * * * docker exec --user www-data -i control-center php artisan schedule:run >/dev/null` every minute. This patches into the container and runs the required cronjobs.
8. To keep uploaded files between deployments, you need to bind this to a host folder, such as `/YOUR/HOST/LOCATION:/app/storage/app/public/files`, and set correct permissions of this folder with
Copy the key and set it as the `APP_KEY` environment variable in your Docker configuration and bind the volume when creating the container with `controlcenter_sessions:/app/storage/framework/sessions`.
7. To keep uploaded files between deployments, you need to bind this to a host folder, such as `/YOUR/HOST/LOCATION:/app/storage/app/public/files`, and set correct permissions of this folder.
```sh
docker exec -it control-center chown -R www-data:www-data /app/storage/app/public/files
```
9. For sessions to save between deployments, you need to setup a shared volume. If you don't do this, users will be logged out every time you re-deploy the container. Run `docker volume create controlcenter_sessions` and bind the volume when creating the container with `controlcenter_sessions:/app/storage/framework/sessions`.
8. Bind the 8080 (HTTP) and/or 8443 (HTTPS) port to your reverse proxy or similar.
8. Setup a crontab _outside_ the container to run `* * * * * docker exec --user www-data -i control-center php artisan schedule:run >/dev/null` every minute. This patches into the container and runs the required cronjobs.
9. Bind the 8080 (HTTP) and/or 8443 (HTTPS) port to your reverse proxy or similar.

## Configuring

Expand Down
14 changes: 7 additions & 7 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Upgrading from version 3.4 to 4.0

To have the smoothest upgrade experience, we highly recommend that you've upgraded to v3.4.0 before upgrading to v4.0.0. This way it'll be easier to isolate issues that might happen on the way.
To have the smoothest upgrade experience, we highly recommend that you've upgraded to v3.4.0 before upgrading to v4.0.x. This way it'll be easier to isolate issues that might happen on the way.

Make sure you have a manual backup of the database before upgrading.

Expand All @@ -23,18 +23,18 @@ In the instructions where we use `docker exec` we assume your container is named
1. Pull the `ghcr.io/vatsim-scandinavia/control-center:v4.0.3` Docker image
2. Configure the environment variables as described in the [CONFIGURE.md](CONFIGURE.md)
3. Start the container
4. Setup a crontab outside the container to run `* * * * * docker exec --user www-data -i control-center php artisan schedule:run >/dev/null` every minute. This patches into the container and runs the required cronjobs.
5. To ensure that users will not need to log in after each time you re-deploy or upgrade the container, you need to create and store an application key in your environment.
4. To ensure that users will not need to log in after each time you re-deploy or upgrade the container, you need to create and store an application key in your environment and setup a shared volume.
```sh
docker exec -it control-center php artisan key:get
docker volume create controlcenter_sessions
```
Copy the key and set it as the `APP_KEY` environment variable in your Docker configuration.
6. Setup a crontab outside the container to run `* * * * * docker exec --user www-data -i control-center php artisan schedule:run >/dev/null` every minute. This patches into the container and runs the required cronjobs.
7. To keep uploaded files between deployments, you need to bind this to a host folder, such as `/YOUR/HOST/LOCATION:/app/storage/app/public/files`, and set correct permissions of this folder with
Copy the key and set it as the `APP_KEY` environment variable in your Docker configuration and bind the volume when creating the container with `controlcenter_sessions:/app/storage/framework/sessions`.
5. To keep uploaded files between deployments, you need to bind this to a host folder, such as `/YOUR/HOST/LOCATION:/app/storage/app/public/files`, and set correct permissions of this folder with
```sh
docker exec -it control-center chown -R www-data:www-data /app/storage/app/public/files
```
8. Bind the 8080 (HTTP) and/or 8443 (HTTPS) port to your reverse proxy or similar.
6. Setup a crontab outside the container to run `* * * * * docker exec --user www-data -i control-center php artisan schedule:run >/dev/null` every minute. This patches into the container and runs the required cronjobs.
7. Bind the 8080 (HTTP) and/or 8443 (HTTPS) port to your reverse proxy or similar.

#### Data Migration

Expand Down

0 comments on commit cae843f

Please sign in to comment.