This commit is contained in:
Alexis Saettler 2020-07-05 14:29:49 +02:00
parent 6a521436c4
commit 053b629fef
No known key found for this signature in database
GPG Key ID: E0E7B3254E8E4407
1 changed files with 111 additions and 116 deletions

View File

@ -16,7 +16,7 @@ The `fpm` tag contains a fastCGI-Process that serves the web pages. This image s
This image contains a webserver that exposes port 80. Run the container with:
```sh
```console
docker run --name some-%%REPO%% -d -p 80:80 %%IMAGE%%
```
@ -24,7 +24,7 @@ docker run --name some-%%REPO%% -d -p 80:80 %%IMAGE%%
This image serves a fastCGI server that exposes port 9000. You may need an additional web server that can proxy requests to the fpm port 9000 of the container. Run this container with:
```sh
```console
docker run --name some-%%REPO%% -d -p 9000:9000 %%IMAGE%%:fpm
```
@ -34,9 +34,9 @@ To have a persistent storage for your datas, you may want to create volumes for
Run a container with this named volume:
```sh
docker run -d
-v monica_data:/var/www/html/storage
```console
docker run -d \
-v monica_data:/var/www/html/storage \
%%IMAGE%%
```
@ -44,13 +44,13 @@ docker run -d
Like every Laravel application, the `php artisan` command is very usefull for Monica. To run a command inside the container, run
```sh
```console
docker exec CONTAINER_ID php artisan COMMAND
```
or for docker-compose
```sh
```console
docker-compose exec %%REPO%% php artisan COMMAND
```
@ -68,10 +68,6 @@ This version will use the apache image and add a mysql container. The volumes ar
Make sure to pass in values for `APP_KEY` variable before you run this setup.
Set `APP_KEY` to a random 32-character string. For example, if you
have the `pwgen` utility installed, you could copy and paste the
output of `pwgen -s 32 1`.
1. Create a `docker-compose.yml` file
```yaml
@ -109,23 +105,23 @@ volumes:
name: mysql
```
2. Set a value for `APP_KEY` variable before you run this setup.
It should be a random 32-character string. For example, if you have the `pwgen` utility installed,
you can copy and paste the output of
```sh
2. Set a value for `APP_KEY` variable before you run this setup. It should be a random 32-character string. For example, if you have the `pwgen` utility installed, you can copy and paste the output of:
```console
pwgen -s 32 1
```
3. Run
```sh
```console
docker-compose up -d
```
Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system.
If this looks ok, add your first user account.
Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system. If this looks ok, add your first user account.
4. Run this command once:
```sh
```console
docker-compose exec app php artisan setup:production
```
@ -133,8 +129,7 @@ volumes:
When using FPM image, you will need another container with a webserver to proxy http requests. In this example we use nginx with a basic container to do this.
1. Download `nginx.conf` and `Dockerfile` file for nginx image. An example can be found on the [`example section`](%%GITHUB-REPO%%/blob/master/.examples/supervisor/fpm/web/).
The `web` container image should be pre-build before each deploy with: `docker-compose build`
1. Download `nginx.conf` and `Dockerfile` file for nginx image. An example can be found on the [`example section`](%%GITHUB-REPO%%/blob/master/.examples/supervisor/fpm/web/). The `web` container image should be pre-build before each deploy with: `docker-compose build`
2. Create a `docker-compose.yml` file
@ -181,23 +176,23 @@ volumes:
name: mysql
```
3. Set a value for `APP_KEY` variable before you run this setup.
It should be a random 32-character string. For example, if you have the `pwgen` utility installed,
you can copy and paste the output of
```sh
3. Set a value for `APP_KEY` variable before you run this setup. It should be a random 32-character string. For example, if you have the `pwgen` utility installed, you can copy and paste the output of:
```console
pwgen -s 32 1
```
4. Run
```sh
```console
docker-compose up -d
```
Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system.
If this looks ok, add your first user account.
Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system. If this looks ok, add your first user account.
5. Run this command once:
```sh
```console
docker-compose exec app php artisan setup:production
```