-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Docker support for development
- Loading branch information
Showing
11 changed files
with
313 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_LOG_LEVEL=debug | ||
APP_URL=http://localhost | ||
APP_DEMO=false | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=mariadb | ||
DB_PORT=3306 | ||
DB_DATABASE=jogging_time | ||
DB_USERNAME=jogging_time | ||
DB_PASSWORD=secret | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=redis | ||
SESSION_DRIVER=file | ||
QUEUE_DRIVER=redis | ||
|
||
REDIS_HOST=redis | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_DRIVER=smtp | ||
MAIL_HOST=mmailcatcher | ||
MAIL_PORT=1025 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_KEY= | ||
PUSHER_SECRET= |
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,65 @@ | ||
FROM php:7.2-fpm | ||
|
||
# Get repository and install wget and vim | ||
RUN apt-get update && apt-get install --no-install-recommends -y wget vim git unzip apt-transport-https gnupg | ||
|
||
RUN apt-get install -y locales \ | ||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ | ||
&& locale-gen | ||
|
||
# Install PHP extensions deps | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libpng-dev \ | ||
zlib1g-dev \ | ||
libicu-dev \ | ||
unixodbc-dev \ | ||
libssl-dev \ | ||
g++ | ||
|
||
# Install PHP extensions | ||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | ||
&& docker-php-ext-install \ | ||
mbstring \ | ||
pdo_mysql \ | ||
zip \ | ||
ftp \ | ||
&& docker-php-ext-enable \ | ||
opcache | ||
|
||
# Install Composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- \ | ||
--install-dir=/usr/local/bin \ | ||
--filename=composer | ||
|
||
# Install supervisor | ||
RUN apt-get install -y supervisor | ||
|
||
# Install Node | ||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | ||
&& apt-get install -y nodejs | ||
|
||
# Install Yarn | ||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | ||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | ||
&& apt-get update && apt-get install -y yarn | ||
|
||
# Clean repository | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Set timezone | ||
RUN rm /etc/localtime | ||
RUN ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
RUN "date" | ||
|
||
CMD mkdir -p /app | ||
|
||
VOLUME /app | ||
|
||
CMD chown -R www-data:www-data /app | ||
|
||
WORKDIR /app | ||
|
||
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,54 @@ | ||
version: '2' | ||
services: | ||
|
||
php: | ||
build: ./ | ||
container_name: jogging_time_php | ||
image: jogging_time_php | ||
volumes: | ||
- .:/app:cached | ||
- ./docker/php.ini:/usr/local/etc/php/conf.d/custom.ini | ||
- ./docker/supervisord.conf:/etc/supervisord.conf | ||
links: | ||
- mariadb | ||
- mailcatcher | ||
- redis | ||
|
||
nginx: | ||
image: nginx:alpine | ||
container_name: jogging_time_nginx | ||
ports: | ||
- 8080:80 | ||
volumes: | ||
- .:/app | ||
- ./docker/default.conf:/etc/nginx/conf.d/default.conf | ||
links: | ||
- php | ||
|
||
mariadb: | ||
image: mariadb:latest | ||
container_name: jogging_time_mysql | ||
ports: | ||
- 33060:3306 | ||
volumes: | ||
- mysql:/var/lib/mysql | ||
environment: | ||
MYSQL_ROOT_PASSWORD: secret | ||
MYSQL_DATABASE: jogging_time | ||
MYSQL_USER: jogging_time | ||
MYSQL_PASS: secret | ||
|
||
mailcatcher: | ||
image: schickling/mailcatcher | ||
container_name: jogging_time_mailcatcher | ||
ports: | ||
- 1080:1080 | ||
|
||
redis: | ||
image: redis:3-alpine | ||
container_name: jogging_time_redis | ||
ports: | ||
- 63790:6379 | ||
|
||
volumes: | ||
mysql: |
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,42 @@ | ||
server { | ||
listen 80; | ||
|
||
#charset koi8-r; | ||
#access_log /var/log/nginx/log/host.access.log main; | ||
|
||
client_max_body_size 200M; | ||
|
||
index index.html index.php; | ||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
root /app/public; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | ||
location ~* \.php$ { | ||
try_files $uri =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass php:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
|
||
# deny access to .htaccess files, if Apache's document root | ||
# concurs with nginx's one | ||
location ~ /\.ht { | ||
deny all; | ||
} | ||
} |
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,3 @@ | ||
memory_limit = 256M | ||
opcache.validate_timestamps = 1 | ||
opcache.revalidate_freq = 1 |
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,25 @@ | ||
[supervisord] | ||
nodaemon=true | ||
logfile=/var/log/supervisor/supervisord.log | ||
pidfile=/var/run/supervisord.pid | ||
childlogdir=/var/log/supervisor | ||
|
||
[program:php-fpm] | ||
process_name=%(program_name)s_%(process_num)02d | ||
command=/usr/local/sbin/php-fpm -F | ||
numprocs=1 | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
autorestart=true | ||
startretries=0 | ||
|
||
[program:laravel-queue] | ||
process_name=%(program_name)s_%(process_num)02d | ||
command=php /app/artisan queue:work --sleep=1 --tries=3 | ||
numprocs=2 | ||
redirect_stderr=true | ||
stdout_logfile=/app/storage/logs/queue.log | ||
autorestart=true | ||
startretries=0 |
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
2 changes: 1 addition & 1 deletion
2
resources/assets/js/components/pages/admin/entry/partials/Row.vue
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
2 changes: 1 addition & 1 deletion
2
resources/assets/js/components/pages/admin/user/partials/Row.vue
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