From d6834603b22bc8a083c242bfb654a056be590380 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sat, 29 Feb 2020 11:01:14 +0100 Subject: [PATCH 1/4] Add Monica doc --- monica/README-short.txt | 1 + monica/content.md | 200 ++++++++++++++++++++++++++++++++++++++++ monica/github-repo | 1 + monica/license.md | 1 + monica/logo.jpg | Bin 0 -> 12860 bytes monica/maintainer.md | 1 + 6 files changed, 204 insertions(+) create mode 100644 monica/README-short.txt create mode 100644 monica/content.md create mode 100644 monica/github-repo create mode 100644 monica/license.md create mode 100644 monica/logo.jpg create mode 100644 monica/maintainer.md diff --git a/monica/README-short.txt b/monica/README-short.txt new file mode 100644 index 000000000..34f1e72d1 --- /dev/null +++ b/monica/README-short.txt @@ -0,0 +1 @@ +Monica – the Personal Relationship Manager. diff --git a/monica/content.md b/monica/content.md new file mode 100644 index 000000000..c942ad9e3 --- /dev/null +++ b/monica/content.md @@ -0,0 +1,200 @@ +# What is Monica? + +Monica is a great open source personal relationship management system to organize the interactions with your loved ones. + +%%LOGO%% + +# How to use this image + +There are two versions of the image you may choose from. + +The `apache` tag contains a full Monica installation with an apache webserver. This points to the default `latest` tag too. + +The `fpm` tag contains a fastCGI-Process that serves the web pages. This image should be combined with a webserver used as a proxy, like apache or nginx. + +### Using the apache image + +This image contains a webserver that exposes port 80. Run the container with: +```sh +docker run --name some-%%REPO%% -d -p 80:80 %%IMAGE%% +``` + +### Using the fpm 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 +docker run --name some-%%REPO%% -d -p 9000:9000 %%IMAGE%%:fpm +``` + +### Persistent data storage + +To have a persistent storage for your datas, you may want to create volumes for your db, and for monica you will have to save the `/var/www/html/storage` directory. + +Run a container with this named volume: +```sh +docker run -d + -v monica_data:/var/www/html/storage + %%IMAGE%% +``` + +### Run commands inside the container + +Like every Laravel application, the `php artisan` command is very usefull for Monica. +To run a command inside the container, run + +```sh +docker exec CONTAINER_ID php artisan COMMAND +``` + +or for docker-compose +```sh +docker-compose exec %%REPO%% php artisan COMMAND +``` +where `%%REPO%%` is the name of the service in your `docker-compose.yml` file. + + +## Running the image with docker-compose + +See some examples of docker-compose possibilities in the [example section](%%GITHUB-REPO%%/blob/master/.examples). + +--- + +### Apache version + +This version will use the apache image and add a mysql container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy. + +Make sure to pass in values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables 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`. + + +```yaml +version: "3.4" + +services: + app: + image: %%IMAGE%% + depends_on: + - mysql + ports: + - 80:80 + environment: + - APP_KEY= + - DB_HOST=mysql + volumes: + - data:/var/www/html/storage + restart: always + + mysql: + image: mysql:5.7 + environment: + - MYSQL_ROOT_PASSWORD= + - MYSQL_DATABASE=monica + - MYSQL_USER=homestead + - MYSQL_PASSWORD=secret + volumes: + - mysql:/var/lib/mysql + restart: always + +volumes: + data: + name: data + mysql: + name: mysql +``` + +Run `docker-compose up -d`. + +Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. + +Then run this command once: +```sh +docker-compose exec app php artisan setup:production +``` + +### FPM version + +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. + +The webserver will need an access to all static files from Monica container, the volumes `html` will deal with it. + +An example of `nginx.conf` file can be found on the [`example section`](%%GITHUB-REPO%%/blob/master/.examples/supervisor/fpm/web/nginx.conf). + +Make sure to set values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables 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`. + + +```yaml +version: "3.4" + +services: + app: + image: %%IMAGE%%:fpm + depends_on: + - mysql + environment: + - APP_KEY= + - DB_HOST=mysql + volumes: + - html:/var/www/html + - data:/var/www/html/storage + restart: always + + web: + image: nginx + ports: + - 80:80 + depends_on: + - app + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + - html:/var/www/html:ro + - data:/var/www/html/storage:ro + restart: always + + mysql: + image: mysql:5.7 + environment: + - MYSQL_ROOT_PASSWORD= + - MYSQL_DATABASE=monica + - MYSQL_USER=homestead + - MYSQL_PASSWORD=secret + volumes: + - mysql:/var/lib/mysql + restart: always + +volumes: + data: + name: data + html: + name: html + mysql: + name: mysql +``` + +Run `docker-compose up -d`. + +Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. + +Then run this command once: +```sh +docker-compose exec app php artisan setup:production +``` + + +## Make Monica available from the internet + +To expose your Monica instance for the internet, it's important to set environment variable `APP_ENV=production`. In this case `https` mode will be mandatory. + +### Using a proxy webserver on the host + +One way to expose your Monica instance is to use a proxy webserver from your host with SSL capabilities. This is possible with a reverse proxy. + +### Using a proxy webserver container + +See some examples of docker-compose possibilities in the [example section](%%GITHUB-REPO%%/blob/master/.examples) to show how to a proxy webserver with ssl capabilities. diff --git a/monica/github-repo b/monica/github-repo new file mode 100644 index 000000000..10cb578be --- /dev/null +++ b/monica/github-repo @@ -0,0 +1 @@ +https://github.com/monicahq/docker diff --git a/monica/license.md b/monica/license.md new file mode 100644 index 000000000..721285392 --- /dev/null +++ b/monica/license.md @@ -0,0 +1 @@ +View [license information](https://github.com/monicahq/monica/blob/master/LICENSE) for the software contained in this image. diff --git a/monica/logo.jpg b/monica/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..905e5bc1ae1621e6bcfa0b84819167a535e44492 GIT binary patch literal 12860 zcmbt)1ymhRv*%pg;o|NP+}+*X39i8%f=dV<2o^j*a0u=$!9BP;!3h>L5cZP)_uhBj zo_%{(`p)hCO?6duS9ec$otk-GeBJ~w6lCOO01yZOK#(8sybYBrFDYrFrlBe$uO$7q z0xI6Y!qFXu4FDXSJlr&7CCK&kUz5XcL-FZj(r`0fR}X=z9T02B%YlfU@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exnJKG3~wgp!ME0{&g`heITUXK9cuidDp|H+M~LjZdPg!6*Uy|`pGNZ? z)}Lk%OhAKmsP>~|xn^su3JIm2q3L|6!LEu3wY8?cH39-|ol_t5#jenO`EXHWyvBE| zmCGK#=L%p5t0F;tU(5CGD(la{W0~*ynUAhyg7knU2`8@||NczYSmK@q%t3DSXu`i+ zP2Se~{lEuv8R}Xvc($(PGo3D_j$975eMNgy#QJbrq40aAx;*QcxHmZOx-pBo3F=K@ z=v}(>(pLv$`!kus8n+7Cs_o?{kw*x$$BiiuQCf3_XE)H?F`s^Q@#`M#a#79NC{tq* zcZ_!rlG8j`&U^h{yjOxd(9nA<~-|f(%Y{opoNL>{S8TxA`p-7<&{WpbVY}8t@ z@>NV3)4^Xs(NpmrQG3(Bh3$k?@Z1em3p~{@i#hr8$T;;Yo8JClM+Ck&?dKXTcF5Zz z9Cpb_44gu&6R+L*)4Z=3XQhfL1j910RWlJ9DQqK&Fh;N?sV2?@_@%Zg_UD+X?Q=^W zmFtL{YM{0Z_%Of(9k(`wkX{GSf#M_5rVx<~0hTuG2N8_WjU;nl#-{;njH9L?=C=ja zgoEoz9STukb*Jz8IjB@pPJu`Whzj*k$C3|})xxQZ9wU*6rlIN>A=T)UVzOIaL!ry@ z{w8(1z!8InOZkXBvcGmP8^#gnZoHWsQCE(BEGyHPu|^X-R`VGv2f6|=I=`fj^6D8t z{F7ZJUOF?Zey4tvsN0Ot9{Tf>#U%qA>@TF;aj}5pA}qUSAUyxoY+$m>Ckr7TSk(p- b3zOH_AKGWSbM3xS=esCE!W5Mz&rAOUAqu{U literal 0 HcmV?d00001 diff --git a/monica/maintainer.md b/monica/maintainer.md new file mode 100644 index 000000000..bf1f56b27 --- /dev/null +++ b/monica/maintainer.md @@ -0,0 +1 @@ +[Monica Team](%%GITHUB-REPO%%) From 266f44a452c0c37b01c1e85f7309ccfb89df722f Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sat, 29 Feb 2020 11:07:55 +0100 Subject: [PATCH 2/4] fix md --- monica/content.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/monica/content.md b/monica/content.md index c942ad9e3..823ea34eb 100644 --- a/monica/content.md +++ b/monica/content.md @@ -15,14 +15,15 @@ The `fpm` tag contains a fastCGI-Process that serves the web pages. This image s ### Using the apache image This image contains a webserver that exposes port 80. Run the container with: + ```sh docker run --name some-%%REPO%% -d -p 80:80 %%IMAGE%% ``` ### Using the fpm 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: +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 docker run --name some-%%REPO%% -d -p 9000:9000 %%IMAGE%%:fpm ``` @@ -32,6 +33,7 @@ docker run --name some-%%REPO%% -d -p 9000:9000 %%IMAGE%%:fpm To have a persistent storage for your datas, you may want to create volumes for your db, and for monica you will have to save the `/var/www/html/storage` directory. Run a container with this named volume: + ```sh docker run -d -v monica_data:/var/www/html/storage @@ -40,19 +42,19 @@ docker run -d ### Run commands inside the container -Like every Laravel application, the `php artisan` command is very usefull for Monica. -To run a command inside the container, run +Like every Laravel application, the `php artisan` command is very usefull for Monica. To run a command inside the container, run ```sh docker exec CONTAINER_ID php artisan COMMAND ``` or for docker-compose + ```sh docker-compose exec %%REPO%% php artisan COMMAND ``` -where `%%REPO%%` is the name of the service in your `docker-compose.yml` file. +where `%%REPO%%` is the name of the service in your `docker-compose.yml` file. ## Running the image with docker-compose @@ -66,9 +68,7 @@ This version will use the apache image and add a mysql container. The volumes ar Make sure to pass in values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables 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`. - +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`. ```yaml version: "3.4" @@ -110,6 +110,7 @@ Run `docker-compose up -d`. Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. Then run this command once: + ```sh docker-compose exec app php artisan setup:production ``` @@ -124,10 +125,7 @@ An example of `nginx.conf` file can be found on the [`example section`](%%GITHUB Make sure to set values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables 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`. - +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`. ```yaml version: "3.4" @@ -182,12 +180,12 @@ Run `docker-compose up -d`. Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. Then run this command once: + ```sh docker-compose exec app php artisan setup:production ``` - -## Make Monica available from the internet +## Make Monica available from the internet To expose your Monica instance for the internet, it's important to set environment variable `APP_ENV=production`. In this case `https` mode will be mandatory. From 6a521436c4e7d1c53083a55ebe8e9788673c26ac Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Tue, 12 May 2020 23:55:49 +0200 Subject: [PATCH 3/4] Update content.md --- monica/content.md | 92 +++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/monica/content.md b/monica/content.md index 823ea34eb..b9568d856 100644 --- a/monica/content.md +++ b/monica/content.md @@ -66,31 +66,35 @@ See some examples of docker-compose possibilities in the [example section](%%GIT This version will use the apache image and add a mysql container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy. -Make sure to pass in values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables before you run this setup. +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`. +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 version: "3.4" services: app: - image: %%IMAGE%% + image: monica depends_on: - - mysql + - db ports: - - 80:80 + - 8080:80 environment: - APP_KEY= - - DB_HOST=mysql + - DB_HOST=db volumes: - data:/var/www/html/storage restart: always - mysql: + db: image: mysql:5.7 environment: - - MYSQL_ROOT_PASSWORD= + - MYSQL_RANDOM_ROOT_PASSWORD=true - MYSQL_DATABASE=monica - MYSQL_USER=homestead - MYSQL_PASSWORD=secret @@ -105,60 +109,64 @@ volumes: name: mysql ``` -Run `docker-compose up -d`. +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 + pwgen -s 32 1 + ``` -Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. +3. Run + ```sh + docker-compose up -d + ``` -Then run this command once: + 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. -```sh -docker-compose exec app php artisan setup:production -``` +4. Run this command once: + ```sh + docker-compose exec app php artisan setup:production + ``` ### FPM version 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. -The webserver will need an access to all static files from Monica container, the volumes `html` will deal with it. +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` -An example of `nginx.conf` file can be found on the [`example section`](%%GITHUB-REPO%%/blob/master/.examples/supervisor/fpm/web/nginx.conf). - -Make sure to set values for `APP_KEY` and `MYSQL_ROOT_PASSWORD` variables 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`. +2. Create a `docker-compose.yml` file ```yaml version: "3.4" services: app: - image: %%IMAGE%%:fpm + image: monica:fpm depends_on: - - mysql + - db environment: - APP_KEY= - - DB_HOST=mysql + - DB_HOST=db volumes: - - html:/var/www/html - data:/var/www/html/storage restart: always web: - image: nginx + build: ./web ports: - - 80:80 + - 8080:80 depends_on: - app volumes: - - ./nginx.conf:/etc/nginx/nginx.conf:ro - - html:/var/www/html:ro - data:/var/www/html/storage:ro restart: always - mysql: + db: image: mysql:5.7 environment: - - MYSQL_ROOT_PASSWORD= + - MYSQL_RANDOM_ROOT_PASSWORD=true - MYSQL_DATABASE=monica - MYSQL_USER=homestead - MYSQL_PASSWORD=secret @@ -169,21 +177,29 @@ services: volumes: data: name: data - html: - name: html mysql: name: mysql ``` -Run `docker-compose up -d`. +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 + pwgen -s 32 1 + ``` -Wait until all migrations are done and then access Monica at http://localhost/ from your host system. If this looks ok, add your first user account. +4. Run + ```sh + docker-compose up -d + ``` -Then run this command once: + 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. -```sh -docker-compose exec app php artisan setup:production -``` +5. Run this command once: + ```sh + docker-compose exec app php artisan setup:production + ``` ## Make Monica available from the internet From 053b629fefedb207eb0c4ac290fdcec83112de89 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sun, 5 Jul 2020 14:29:49 +0200 Subject: [PATCH 4/4] update --- monica/content.md | 227 +++++++++++++++++++++++----------------------- 1 file changed, 111 insertions(+), 116 deletions(-) diff --git a/monica/content.md b/monica/content.md index b9568d856..f5e6bf89e 100644 --- a/monica/content.md +++ b/monica/content.md @@ -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,138 +68,133 @@ 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 -1. Create a `docker-compose.yml` file + ```yaml + version: "3.4" -```yaml -version: "3.4" + services: + app: + image: monica + depends_on: + - db + ports: + - 8080:80 + environment: + - APP_KEY= + - DB_HOST=db + volumes: + - data:/var/www/html/storage + restart: always -services: - app: - image: monica - depends_on: - - db - ports: - - 8080:80 - environment: - - APP_KEY= - - DB_HOST=db - volumes: - - data:/var/www/html/storage - restart: always + db: + image: mysql:5.7 + environment: + - MYSQL_RANDOM_ROOT_PASSWORD=true + - MYSQL_DATABASE=monica + - MYSQL_USER=homestead + - MYSQL_PASSWORD=secret + volumes: + - mysql:/var/lib/mysql + restart: always - db: - image: mysql:5.7 - environment: - - MYSQL_RANDOM_ROOT_PASSWORD=true - - MYSQL_DATABASE=monica - - MYSQL_USER=homestead - - MYSQL_PASSWORD=secret - volumes: - - mysql:/var/lib/mysql - restart: always + volumes: + data: + name: data + mysql: + name: mysql + ``` -volumes: - data: - name: data - mysql: - 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: -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 - pwgen -s 32 1 - ``` + ```console + pwgen -s 32 1 + ``` -3. Run - ```sh - docker-compose up -d - ``` +3. Run - 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. + ```console + docker-compose up -d + ``` -4. Run this command once: - ```sh - docker-compose exec app php artisan setup:production - ``` + 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: + + ```console + docker-compose exec app php artisan setup:production + ``` ### FPM version 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 +2. Create a `docker-compose.yml` file -```yaml -version: "3.4" + ```yaml + version: "3.4" -services: - app: - image: monica:fpm - depends_on: - - db - environment: - - APP_KEY= - - DB_HOST=db - volumes: - - data:/var/www/html/storage - restart: always - - web: - build: ./web - ports: - - 8080:80 - depends_on: - - app - volumes: - - data:/var/www/html/storage:ro - restart: always + services: + app: + image: monica:fpm + depends_on: + - db + environment: + - APP_KEY= + - DB_HOST=db + volumes: + - data:/var/www/html/storage + restart: always - db: - image: mysql:5.7 - environment: - - MYSQL_RANDOM_ROOT_PASSWORD=true - - MYSQL_DATABASE=monica - - MYSQL_USER=homestead - - MYSQL_PASSWORD=secret - volumes: - - mysql:/var/lib/mysql - restart: always + web: + build: ./web + ports: + - 8080:80 + depends_on: + - app + volumes: + - data:/var/www/html/storage:ro + restart: always -volumes: - data: - name: data - mysql: - name: mysql -``` + db: + image: mysql:5.7 + environment: + - MYSQL_RANDOM_ROOT_PASSWORD=true + - MYSQL_DATABASE=monica + - MYSQL_USER=homestead + - MYSQL_PASSWORD=secret + volumes: + - mysql:/var/lib/mysql + restart: always -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 - pwgen -s 32 1 - ``` + volumes: + data: + name: data + mysql: + name: mysql + ``` -4. Run - ```sh - docker-compose up -d - ``` +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: - 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. + ```console + pwgen -s 32 1 + ``` -5. Run this command once: - ```sh - docker-compose exec app php artisan setup:production - ``` +4. Run + + ```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. + +5. Run this command once: + + ```console + docker-compose exec app php artisan setup:production + ``` ## Make Monica available from the internet