-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker for development support + added docker-squash to reduce …
…docker image size (#1167)
- Loading branch information
Showing
8 changed files
with
246 additions
and
30 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
Binary file not shown.
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,71 @@ | ||
APP_ENV=local | ||
APP_DEBUG=true | ||
|
||
APP_KEY=ChangeMeBy32KeyLengthOrGenerated | ||
HASH_SALT=ChangeMeBy20+KeyLength | ||
HASH_LENGTH=18 | ||
|
||
APP_URL=http://localhost | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=mysql | ||
DB_PORT=3306 | ||
DB_DATABASE=monica | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
DB_PREFIX= | ||
|
||
# Mail credentials used to send emails from the application. | ||
MAIL_DRIVER=smtp | ||
MAIL_HOST=mailtrap.io | ||
MAIL_PORT=2525 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
MAIL_FROM_ADDRESS=ValidEmailAddress | ||
MAIL_FROM_NAME="Some Name" | ||
APP_EMAIL_NEW_USERS_NOTIFICATION=EmailThatWillSendNotificationsForNewUser | ||
|
||
# Default timezone for new users. Users can change this setting inside the | ||
# application at their leisure. | ||
# Must be exactly one of the timezones used in this list: | ||
# https://github.com/monicahq/monica/blob/master/resources/views/settings/index.blade.php#L70 | ||
APP_DEFAULT_TIMEZONE=US/Eastern | ||
|
||
# Default locale used in the application. | ||
APP_DEFAULT_LOCALE=en | ||
|
||
# Ability to disable signups on your instance. | ||
# Can be true or false. Default to false. | ||
APP_DISABLE_SIGNUP=false | ||
|
||
# Frequency of creation of new log files. Logs are written when an error occurs. | ||
# Refer to config/logging.php for the possible values. | ||
LOG_CHANNEL=syslog | ||
|
||
SENTRY_SUPPORT=false | ||
SENTRY_DSN= | ||
|
||
CHECK_VERSION=false | ||
|
||
REQUIRES_SUBSCRIPTION=false | ||
|
||
# Change this only if you know what you are doing | ||
CACHE_DRIVER=file | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
QUEUE_DRIVER=sync | ||
|
||
# Default filesystem to store uploaded files. | ||
# Possible values: public|s3 | ||
DEFAULT_FILESYSTEM=public | ||
|
||
# AWS keys for S3 when using this storage method | ||
AWS_KEY= | ||
AWS_SECRET= | ||
AWS_REGION=us-east-1 | ||
AWS_BUCKET= | ||
AWS_SERVER= | ||
|
||
# Enable Two Factor Authentication | ||
2FA_ENABLED=false |
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,67 @@ | ||
FROM alpine:3.6 | ||
|
||
EXPOSE 80:80 | ||
|
||
RUN apk update && apk upgrade; \ | ||
apk add --virtual .build-deps \ | ||
curl openssl; \ | ||
apk add apache2 make netcat-openbsd \ | ||
#- base | ||
php7 php7-apache2 php7-intl php7-openssl php7-ctype \ | ||
php7-zip php7-zlib \ | ||
php7-redis \ | ||
#- Authentication Guards | ||
php7-session php7-tokenizer \ | ||
#- laravel/cashier sabre/vobject sabre/xml | ||
php7-dom \ | ||
#- intervention/image | ||
php7-fileinfo \ | ||
#- laravel/cashier | ||
php7-gd \ | ||
#- composer | ||
php7-phar php7-json php7-iconv \ | ||
#- laravel/framework sabre/vobject | ||
php7-mbstring \ | ||
#- league/flysystem-aws-s3-v3 | ||
php7-simplexml \ | ||
#- sabre/vobject sabre/xml | ||
php7-xml php7-xmlreader php7-xmlwriter \ | ||
#- mysql | ||
php7-mysqli php7-pdo_mysql \ | ||
#- pgsql | ||
php7-pgsql php7-pdo_pgsql \ | ||
#- vinkla/hashids | ||
php7-bcmath \ | ||
#- sentry/sentry | ||
php7-curl; \ | ||
# Create apache2 dir needed for httpd | ||
mkdir -p /run/apache2 | ||
|
||
# Create a user to own all the code and assets and give them a working | ||
# directory | ||
RUN adduser -D monica apache -h /var/www/monica | ||
WORKDIR /var/www/monica | ||
|
||
# Copy the local (outside Docker) source into the working directory, | ||
# copy system files into their proper homes, and set file ownership | ||
# correctly | ||
ADD . . | ||
ADD .env.dev .env | ||
RUN chown -R monica:monica . && \ | ||
chgrp -R apache bootstrap/cache storage && \ | ||
chmod -R g+w bootstrap/cache storage && \ | ||
# Apache2 conf | ||
cp scripts/docker/000-default.conf /etc/apache2/conf.d/; \ | ||
# Composer installation | ||
scripts/docker/install-composer.sh; \ | ||
# Cleanup | ||
apk del .build-deps && rm -rf /var/cache/apk/* | ||
|
||
|
||
# Install composer dependencies and prepare permissions for Apache | ||
USER monica | ||
RUN composer install --no-interaction --no-suggest | ||
USER root | ||
|
||
# This is the command that the container will run by default | ||
ENTRYPOINT ["make", "-f", "/var/www/monica/scripts/docker/Makefile"] |
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,43 @@ | ||
version: '3' | ||
services: | ||
monicahq: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
links: | ||
- mysql | ||
ports: | ||
- 8080:80 | ||
env_file: .env.dev | ||
environment: | ||
- PASSWORD_CLIENT_ID=10 | ||
- PASSWORD_CLIENT_SECRET=4eYqKmvMr1nLhRNiI30fkPARM77j90MgBTaJADgN | ||
volumes: | ||
- /var/www/monica/storage | ||
- ./app:/var/www/monica/app | ||
- ./routes:/var/www/monica/routes | ||
- ./database:/var/www/monica/database | ||
|
||
mysql: | ||
image: mysql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=sekret_root_password | ||
- MYSQL_DATABASE=monica | ||
- MYSQL_USER=homestead | ||
- MYSQL_PASSWORD=secret | ||
volumes: | ||
- /var/lib/mysql | ||
|
||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
links: | ||
- mysql | ||
environment: | ||
PMA_HOST: mysql | ||
PMA_USER: root | ||
PMA_PASSWORD: sekret_root_password | ||
restart: always | ||
ports: | ||
- "3000:80" | ||
volumes: | ||
- "/sessions" |