-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
392 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# The URL of your application. | ||
APP_URL=http://localhost | ||
|
||
# Database information | ||
DB_CONNECTION=mysql | ||
DB_HOST=db | ||
DB_DATABASE=monica | ||
DB_USERNAME=monica | ||
|
||
LOG_STACK=stderr | ||
|
||
CACHE_STORE=memcached | ||
QUEUE_CONNECTION=redis | ||
SESSION_DRIVER=database | ||
REDIS_HOST=redis | ||
|
||
# Mail credentials used to send emails from the application. | ||
MAIL_MAILER=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=hello@example.com | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
MAIL_REPLY_TO_ADDRESS=hello@example.com | ||
MAIL_REPLY_TO_NAME="${APP_NAME}" | ||
|
||
SCOUT_DRIVER=meilisearch | ||
SCOUT_QUEUE=true | ||
MEILISEARCH_HOST=http://meilisearch:7700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM monica:5.0-fpm-alpine | ||
|
||
# Use the default production configuration | ||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
ENV PHP_UPLOAD_LIMIT="10G" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Run Monica with fpm flavor, mariadb, cron, queue, redis, and nginx | ||
# | ||
# You first need to generate the secrets for the encryption key and db password: | ||
# `{ echo -n 'base64:'; openssl rand -base64 32; } | docker secret create app_key -` | ||
# `openssl rand -hex 24 | docker secret create mysql_password -` | ||
# | ||
# You might want to set these variables in you .env file: | ||
#- APP_URL with your domain (https scheme) | ||
# | ||
|
||
services: | ||
app: &app | ||
build: ./app | ||
image: monica-app | ||
env_file: .env | ||
environment: | ||
- APP_KEY_FILE=/run/secrets/app_key | ||
- DB_PASSWORD_FILE=/run/secrets/mysql_password | ||
- MEILISEARCH_KEY=ChangeMe_ChangeMe | ||
volumes: | ||
- data:/var/www/html/storage | ||
networks: | ||
- monica | ||
restart: always | ||
depends_on: | ||
- db | ||
- redis | ||
- memcached | ||
- meilisearch | ||
secrets: | ||
- app_key | ||
- mysql_password | ||
|
||
db: | ||
image: mariadb:11 | ||
environment: | ||
- MYSQL_RANDOM_ROOT_PASSWORD=true | ||
- MYSQL_DATABASE=monica | ||
- MYSQL_USER=monica | ||
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password | ||
volumes: | ||
- mysqldata:/var/lib/mysql | ||
networks: | ||
- monica | ||
restart: always | ||
secrets: | ||
- mysql_password | ||
|
||
redis: | ||
image: redis:alpine | ||
restart: always | ||
networks: | ||
- monica | ||
|
||
cron: | ||
<<: *app | ||
command: cron.sh | ||
|
||
queue: | ||
<<: *app | ||
command: queue.sh | ||
|
||
memcached: | ||
image: memcached:alpine | ||
networks: | ||
- monica | ||
|
||
meilisearch: | ||
image: getmeili/meilisearch:latest | ||
environment: | ||
- MEILI_MASTER_KEY=ChangeMe_ChangeMe | ||
- MEILISEARCH_NO_ANALYTICS=true | ||
volumes: | ||
- meili_data:/meili_data | ||
networks: | ||
- monica | ||
|
||
web: | ||
build: ./web | ||
image: monica-web | ||
restart: always | ||
ports: | ||
- 80:80 | ||
volumes: | ||
- data:/var/www/html/storage:ro | ||
networks: | ||
- monica | ||
depends_on: | ||
- app | ||
|
||
|
||
networks: | ||
monica: | ||
driver: overlay | ||
|
||
|
||
volumes: | ||
data: | ||
driver: local | ||
mysqldata: | ||
driver: local | ||
meili_data: | ||
driver: local | ||
|
||
|
||
secrets: | ||
app_key: | ||
external: true | ||
mysql_password: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM monica:5.0-fpm-alpine AS monica | ||
|
||
FROM nginx:alpine | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Copy content of monica image | ||
COPY --from=monica /var/www/html /var/www/html | ||
RUN ln -sf /var/www/html/storage/app/public /var/www/html/public/storage |
Oops, something went wrong.