Skip to content

Commit

Permalink
docs: update examples (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Jan 30, 2023
1 parent 1e5f0f4 commit a70ba74
Show file tree
Hide file tree
Showing 17 changed files with 350 additions and 61 deletions.
39 changes: 39 additions & 0 deletions .examples/maxsize/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
APP_ENV=production
APP_DEBUG=false

# The encryption key. Must be 32 characters long exactly.
# Use `echo -n 'base64:'; openssl rand -base64 32` to generate a random key.
# APP_KEY=

# The URL of your application.
APP_URL=http://localhost

# Set trusted proxy IP addresses.
# To trust all proxies that connect directly to your server, use a "*".
APP_TRUSTED_PROXIES=

# Database information
DB_CONNECTION=mysql
DB_HOST=db
DB_DATABASE=monica
DB_USERNAME=monica
DB_PASSWORD=secret

# Mail credentials used to send emails from the application.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.domain.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
# Outgoing emails will be sent with these identity
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="Monica instance"

LOG_CHANNEL=stderr

CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=sync

DEFAULT_MAX_UPLOAD_SIZE=500000
27 changes: 20 additions & 7 deletions .examples/maxsize/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
version: "3.4"
# Run Monica with nginx proxy and specific file size limits
#
# You might want to set these variables in you .env file:
#
#- APP_ENV=production
#- APP_URL with your domain (https scheme)
#- APP_KEY with a random string
#
#- DB_HOST=db
# See `db` container for these values:
#- DB_DATABASE=monica
#- DB_USERNAME=monica
#- DB_PASSWORD=secret
#
# Also set this to the appropriate limit:
#- DEFAULT_MAX_UPLOAD_SIZE=500000
#

version: "3.9"

services:
app:
build: ./app
image: monica-app
env_file: .env
depends_on:
- db
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
- DEFAULT_MAX_UPLOAD_SIZE=500000
volumes:
- data:/var/www/html/storage
restart: always
Expand Down
38 changes: 38 additions & 0 deletions .examples/nginx-proxy-self-signed-ssl/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
APP_ENV=production
APP_DEBUG=false

# The encryption key. Must be 32 characters long exactly.
# Use `echo -n 'base64:'; openssl rand -base64 32` to generate a random key.
# APP_KEY=

# The URL of your application.
APP_URL=https://localhost

# Set trusted proxy IP addresses.
# To trust all proxies that connect directly to your server, use a "*".
APP_TRUSTED_PROXIES=*

# Database information
DB_CONNECTION=mysql
DB_HOST=db
DB_DATABASE=monica
DB_USERNAME=monica
DB_PASSWORD=secret

# Mail credentials used to send emails from the application.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.domain.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
# Outgoing emails will be sent with these identity
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="Monica instance"

LOG_CHANNEL=stderr

CACHE_DRIVER=redis
SESSION_DRIVER=database
QUEUE_DRIVER=redis
REDIS_HOST=redis
20 changes: 4 additions & 16 deletions .examples/nginx-proxy-self-signed-ssl/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#
#- APP_ENV=production
#- APP_URL with your domain (https scheme)
#- APP_KEY with a random string
#- APP_TRUSTED_PROXIES=*

#
# If you're not using default 443 port for https, set APP_URL and:
#- APP_FORCE_URL=true

#
#- DB_HOST=db
# See `db` container for these values:
#- DB_DATABASE=monica
Expand All @@ -21,18 +22,13 @@
#- QUEUE_DRIVER=redis
#

version: "3.4"
version: "3.9"

services:
app:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
- APP_TRUSTED_PROXIES=*
volumes:
- data:/var/www/html/storage
restart: always
Expand All @@ -59,10 +55,6 @@ services:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
restart: always
volumes:
- data:/var/www/html/storage
Expand All @@ -75,10 +67,6 @@ services:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
restart: always
volumes:
- data:/var/www/html/storage
Expand Down
38 changes: 38 additions & 0 deletions .examples/nginx-proxy/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
APP_ENV=production
APP_DEBUG=false

# The encryption key. Must be 32 characters long exactly.
# Use `echo -n 'base64:'; openssl rand -base64 32` to generate a random key.
# APP_KEY=

# The URL of your application.
APP_URL=http://localhost

# Set trusted proxy IP addresses.
# To trust all proxies that connect directly to your server, use a "*".
APP_TRUSTED_PROXIES=

# Database information
DB_CONNECTION=mysql
DB_HOST=db
DB_DATABASE=monica
DB_USERNAME=monica
DB_PASSWORD=secret

# Mail credentials used to send emails from the application.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.domain.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
# Outgoing emails will be sent with these identity
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="Monica instance"

LOG_CHANNEL=stderr

CACHE_DRIVER=redis
SESSION_DRIVER=database
QUEUE_DRIVER=redis
REDIS_HOST=redis
17 changes: 3 additions & 14 deletions .examples/nginx-proxy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Run Monica with Let's Encrypt certificate
# Run Monica with nginx proxy
#
# You might want to set these variables in you .env file:
#
#- APP_ENV=production
#- APP_URL with your domain (https scheme)
#- APP_KEY with a random string
#
#- DB_HOST=db
# See `db` container for these values:
Expand All @@ -17,17 +18,13 @@
#- QUEUE_CONNECTION=redis
#

version: "3.4"
version: "3.9"

services:
app:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
volumes:
- data:/var/www/html/storage
restart: always
Expand All @@ -54,10 +51,6 @@ services:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
restart: always
volumes:
- data:/var/www/html/storage
Expand All @@ -70,10 +63,6 @@ services:
build: ./app
image: monica-app
env_file: .env
environment:
- DB_HOST=db
- DB_USERNAME=monica
- DB_PASSWORD=secret
restart: always
volumes:
- data:/var/www/html/storage
Expand Down
33 changes: 29 additions & 4 deletions .examples/raspberrypi/.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
APP_KEY=app_key
APP_URL="raspberrypi.local:8080"
APP_ENV=production
APP_DEBUG=false

# The encryption key. Must be 32 characters long exactly.
# Use `echo -n 'base64:'; openssl rand -base64 32` to generate a random key.
# APP_KEY=

# The URL of your application.
APP_URL=http://localhost

# Set trusted proxy IP addresses.
# To trust all proxies that connect directly to your server, use a "*".
APP_TRUSTED_PROXIES=

# Database information
DB_CONNECTION=mysql
DB_HOST=db
DB_DATABASE=monica
DB_USERNAME=monica
DB_PASSWORD=secret

MAIL_MAILER=smtp
# Mail credentials used to send emails from the application.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.domain.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
# Outgoing emails will be sent with these identity
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME=Monica
MAIL_FROM_NAME="Monica instance"

LOG_CHANNEL=stderr

CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=sync
2 changes: 1 addition & 1 deletion .examples/raspberrypi/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.4"
version: "3.9"

services:
app:
Expand Down
12 changes: 10 additions & 2 deletions .examples/simple/apache/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: "3.4"
# Run Monica with apache backend

version: "3.9"

services:
app:
Expand All @@ -8,15 +10,21 @@ services:
ports:
- 80:80
environment:
- APP_ENV=production
- DB_HOST=db
- DB_DATABASE=monica
- DB_USERNAME=monica
- DB_PASSWORD=secret
- LOG_CHANNEL=stderr
- CACHE_DRIVER=database
- SESSION_DRIVER=database
- QUEUE_DRIVER=sync
volumes:
- data:/var/www/html/storage
restart: always

db:
image: mysql:5.7
image: mysql:8.0
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=monica
Expand Down
10 changes: 9 additions & 1 deletion .examples/simple/fpm/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
version: "3.4"
# Run Monica with fpm+nginx backend

version: "3.9"

services:
app:
image: monica:fpm
depends_on:
- db
environment:
- APP_ENV=production
- DB_HOST=db
- DB_DATABASE=monica
- DB_USERNAME=monica
- DB_PASSWORD=secret
- LOG_CHANNEL=stderr
- CACHE_DRIVER=database
- SESSION_DRIVER=database
- QUEUE_DRIVER=sync
volumes:
- data:/var/www/html/storage
restart: always
Expand Down
Loading

0 comments on commit a70ba74

Please sign in to comment.