Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
Proxy
Commits
13dd7157
Commit
13dd7157
authored
5 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
added required php packages to image
parent
75009bd1
No related branches found
No related tags found
1 merge request
!16
Resolve "fix docker image"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+12
-3
12 additions, 3 deletions
Dockerfile
DockerfileDev
+52
-0
52 additions, 0 deletions
DockerfileDev
docker-compose.yml
+16
-2
16 additions, 2 deletions
docker-compose.yml
with
80 additions
and
5 deletions
Dockerfile
+
12
−
3
View file @
13dd7157
...
...
@@ -7,6 +7,17 @@ RUN apk add --update \
dcron
\
php7
\
php7-fpm
\
php7-json
\
php7-session
\
php7-openssl
\
php7-bcmath
\
php7-ctype
\
php7-mbstring
\
php7-pdo
\
php7-tokenizer
\
php7-xml
\
php7-curl
\
php7-dom
\
&&
rm
-rf
/var/cache/apk/
*
WORKDIR
/html
...
...
@@ -51,7 +62,5 @@ COPY --chown=root:nginx . /html
WORKDIR
/html
EXPOSE
80
CMD
chown -R root:nginx storage/logs/metager bootstrap/cache && \
chmod -R g+w storage/logs/metager bootstrap/cache && \
crond -L /dev/stdout && \
CMD
crond -L /dev/stdout && \
php-fpm7
This diff is collapsed.
Click to expand it.
DockerfileDev
0 → 100644
+
52
−
0
View file @
13dd7157
FROM alpine:3.11.3
RUN apk add --update \
nginx \
tzdata \
ca-certificates \
dcron \
php7 \
php7-fpm \
php7-json \
php7-session \
php7-openssl \
php7-bcmath \
php7-ctype \
php7-mbstring \
php7-pdo \
php7-tokenizer \
php7-xml \
php7-curl \
php7-dom \
&& rm -rf /var/cache/apk/*
WORKDIR /html
RUN sed -i 's/;error_log = log\/php7\/error.log/error_log = \/dev\/stderr/g' /etc/php7/php-fpm.conf && \
sed -i 's/;daemonize = yes/daemonize = no/g' /etc/php7/php-fpm.conf && \
sed -i 's/listen = 127.0.0.1:9000/listen = 9000/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;request_terminate_timeout = 0/request_terminate_timeout = 30/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;request_terminate_timeout_track_finished = no/request_terminate_timeout_track_finished = yes/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;decorate_workers_output = no/decorate_workers_output = no/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;catch_workers_output = yes/catch_workers_output = yes/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/user = nobody/user = nginx/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/group = nobody/group = nginx/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/pm.max_children = 5/pm.max_children = 100/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/pm.start_servers = 2/pm.start_servers = 5/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/pm.min_spare_servers = 1/pm.min_spare_servers = 5/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/pm.max_spare_servers = 3/pm.max_spare_servers = 25/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/user = www-data/user = nginx/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/group = www-data/group = nginx/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
sed -i 's/expose_php = On/expose_php = Off/g' /etc/php7/php.ini && \
ln -s /dev/null /var/log/nginx/access.log && \
ln -s /dev/stdout /var/log/nginx/error.log && \
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
echo "Europe/Berlin" > /etc/timezone && \
(crontab -l ; echo "* * * * * php /html/artisan schedule:run >> /dev/null 2>&1") | crontab -
WORKDIR /html
EXPOSE 80
CMD crond -L /dev/stdout && \
php-fpm7
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
16
−
2
View file @
13dd7157
...
...
@@ -11,15 +11,29 @@ services:
-
.:/usr/src/app
working_dir
:
/usr/src/app
command
:
bash -c "npm install && npm run watch"
web
:
phpfpm
:
depends_on
:
-
"
phpdeps"
-
"
assets"
-
"
redis"
build
:
.
restart
:
on-failure
build
:
context
:
.
dockerfile
:
DockerfileDev
image
:
metager:latest
working_dir
:
/html
volumes
:
-
.:/html
web
:
depends_on
:
-
"
phpfpm"
image
:
metager:latest
working_dir
:
/html
command
:
nginx
volumes
:
-
.:/html
-
./config/nginx.conf:/etc/nginx/nginx.conf
-
./config/nginx-default.conf:/etc/nginx/conf.d/default.conf
ports
:
-
"
8080:80"
redis
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment