Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
9eadf408
Commit
9eadf408
authored
Nov 22, 2019
by
Dominik Hebeler
Browse files
Docker image is now working
parent
75edc45e
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
9eadf408
FROM
debian:buster
FROM
nginx
RUN
apt-get update
&&
apt-get
install
-y
\
composer
\
php7.2
\
php-mbstring
\
php7.2-xml
\
php-zip
\
php-gd
\
php-sqlite3
\
php-mysql
\
php-curl
\
redis-server
\
sqlite3
\
nodejs
\
libpng-dev
\
unzip
\
npm
RUN
npm
install
gulp
-g
RUN
apt
-y
update
&&
apt
-y
install
php-fpm
\
ca-certificates
\
zip
\
php7.3-common
\
php7.3-curl
\
php7.3-mbstring
\
php7.3-sqlite3
\
php7.3-xml
\
php7.3-zip
\
php7.3-redis
\
php7.3-gd
\
redis-server
COPY
. /app
WORKDIR
app
RUN
mv
config/sumas.xml.example config/sumas.xml
&&
mv
.env.example .env
RUN
composer
install
--no-plugins
--no-scripts
RUN
npm
install
RUN
npm run dev
RUN
sed
-i
's/listen.owner = www-data/listen.owner = nginx/g'
/etc/php/7.3/fpm/pool.d/www.conf
&&
\
sed
-i
's/listen.group = www-data/listen.group = nginx/g'
/etc/php/7.3/fpm/pool.d/www.conf
&&
\
sed
-i
's/user = www-data/user = nginx/g'
/etc/php/7.3/fpm/pool.d/www.conf
&&
\
sed
-i
's/group = www-data/group = nginx/g'
/etc/php/7.3/fpm/pool.d/www.conf
&&
\
sed
-i
's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g'
/etc/php/7.3/fpm/php.ini
&&
\
mkdir
/html
RUN
php artisan key:generate
WORKDIR
/html
EXPOSE
80
CMD
redis-server --daemonize yes && php artisan serve --host=0.0.0.0
COPY
config/nginx.conf /etc/nginx/nginx.conf
COPY
config/nginx-default.conf /etc/nginx/conf.d/default.conf
COPY
. /html
EXPOSE
8000
CMD
/etc/init.d/php7.3-fpm start && /etc/init.d/nginx start && /etc/init.d/redis-server start && php artisan worker:spawner
config/nginx-default.conf
0 → 100644
View file @
9eadf408
server
{
listen
80
;
server_name
localhost
;
root
/
html
/
public
;
index
index
.
php
index
.
html
index
.
htm
;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location
/ {
try_files
$
uri
$
uri
/ /
index
.
php
?$
query_string
;
}
location
~ \.
php
$ {
try_files
$
uri
/
index
.
php
=
404
;
fastcgi_split_path_info
^(.+\.
php
)(/.+)$;
fastcgi_pass
unix
:/
var
/
run
/
php
/
php7
.
3
-
fpm
.
sock
;
fastcgi_index
index
.
php
;
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
fastcgi_script_name
;
include
fastcgi_params
;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
\ No newline at end of file
config/nginx.conf
0 → 100644
View file @
9eadf408
user
nginx
;
worker_processes
100
;
error_log
/var/log/nginx/error.log
warn
;
pid
/var/run/nginx.pid
;
events
{
worker_connections
1024
;
}
http
{
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
#tcp_nopush on;
keepalive_timeout
65
;
gzip
on
;
include
/etc/nginx/conf.d/*.conf
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment