Skip to content

Commit bdc8370

Browse files
Vyshakh PVyshakh P
authored andcommitted
docker configs are addded
1 parent 3f78971 commit bdc8370

File tree

5 files changed

+171
-4
lines changed

5 files changed

+171
-4
lines changed

Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ COPY docker/entrypoint.sh /sbin/entrypoint.sh
6060
RUN chmod 755 /sbin/entrypoint.sh
6161
RUN a2enmod headers rewrite expires
6262

63-
#COPY . /var/www/app/
64-
65-
#RUN cd /var/www/app/tools/ && composer install
66-
6763
WORKDIR /var/www/app/
6864
EXPOSE 80 443
6965

docker/configs/apache2.conf

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
ServerName localhost
2+
#
3+
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
4+
#
5+
Mutex file:${APACHE_LOCK_DIR} default
6+
7+
#
8+
# PidFile: The file in which the server should record its process
9+
# identification number when it starts.
10+
# This needs to be set in /etc/apache2/envvars
11+
#
12+
PidFile ${APACHE_PID_FILE}
13+
14+
#
15+
# Timeout: The number of seconds before receives and sends time out.
16+
#
17+
Timeout 300
18+
19+
#
20+
# KeepAlive: Whether or not to allow persistent connections (more than
21+
# one request per connection). Set to "Off" to deactivate.
22+
#
23+
KeepAlive On
24+
25+
#
26+
# MaxKeepAliveRequests: The maximum number of requests to allow
27+
# during a persistent connection. Set to 0 to allow an unlimited amount.
28+
# We recommend you leave this number high, for maximum performance.
29+
#
30+
MaxKeepAliveRequests 100
31+
32+
#
33+
# KeepAliveTimeout: Number of seconds to wait for the next request from the
34+
# same client on the same connection.
35+
#
36+
KeepAliveTimeout 5
37+
38+
# These need to be set in /etc/apache2/envvars
39+
User www-data
40+
Group www-data
41+
42+
#
43+
# HostnameLookups: Log the names of clients or just their IP addresses
44+
# e.g., www.apache.org (on) or 204.62.129.132 (off).
45+
# The default is off because it'd be overall better for the net if people
46+
# had to knowingly turn this feature on, since enabling it means that
47+
# each client request will result in AT LEAST one lookup request to the
48+
# nameserver.
49+
HostnameLookups Off
50+
51+
# ErrorLog: The location of the error log file.
52+
# If you do not specify an ErrorLog directive within a <VirtualHost>
53+
# container, error messages relating to that virtual host will be
54+
# logged here. If you *do* define an error logfile for a <VirtualHost>
55+
# container, that host's errors will be logged there and not here.
56+
#
57+
#
58+
#ErrorLog ${APACHE_LOG_DIR}/error.log
59+
ErrorLog /var/log/apache2/error.log
60+
CustomLog /var/log/apache2/access.log vhost_combined
61+
#CustomLog /var/log/apache2/access.log combined
62+
63+
#
64+
# LogLevel: Control the severity of messages logged to the error_log.
65+
# Available values: trace8, ..., trace1, debug, info, notice, warn,
66+
# error, crit, alert, emerg.
67+
# It is also possible to configure the log level for particular modules, e.g.
68+
# "LogLevel info ssl:warn"
69+
#
70+
LogLevel warn
71+
72+
# Include module configuration:
73+
Include /etc/apache2/mods-enabled/*.load
74+
Include /etc/apache2/mods-enabled/*.conf
75+
# Include list of ports to listen on
76+
Include ports.conf
77+
78+
# AccessFileName: The name of the file to look for in each directory
79+
# for additional configuration directives. See also the AllowOverride
80+
# directive.
81+
#
82+
AccessFileName .htaccess
83+
84+
#
85+
# The following lines prevent .htaccess and .htpasswd files from being
86+
# viewed by Web clients.
87+
#
88+
<FilesMatch "^\.ht">
89+
Require all denied
90+
</FilesMatch>
91+
92+
#
93+
# The following directives define some format nicknames for use with
94+
# a CustomLog directive.
95+
#
96+
# These deviate from the Common Log Format definitions in that they use %O
97+
# (the actual bytes sent including headers) instead of %b (the size of the
98+
# requested file), because the latter makes it impossible to detect partial
99+
# requests.
100+
#
101+
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
102+
# Use mod_remoteip instead.
103+
#
104+
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
105+
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
106+
LogFormat "%h %l %u %t \"%r\" %>s %O" common
107+
LogFormat "%{Referer}i -> %U" referer
108+
LogFormat "%{User-agent}i" agent
109+
110+
# Include of directories ignores editors' and dpkg's backup files,
111+
# see README.Debian for details.
112+
113+
# Include generic snippets of statements
114+
IncludeOptional conf-enabled/*.conf
115+
116+
# Include the virtual host configurations:
117+
IncludeOptional sites-enabled/*.conf
118+
119+
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

docker/configs/app.conf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<VirtualHost *:80>
2+
ServerAdmin admin@localhost
3+
ServerName app
4+
#ServerAlias www.app
5+
DocumentRoot /var/www/app
6+
7+
<Directory /var/www/app>
8+
Options FollowSymLinks
9+
AllowOverride All
10+
AddDefaultCharset utf-8
11+
DirectoryIndex index.php
12+
Require all granted
13+
<IfModule mod_rewrite.c>
14+
RewriteEngine On
15+
16+
# Merge slashes "//" to "/"
17+
RewriteCond %{THE_REQUEST} .*\ (.*)//(.*)\ HTTP/
18+
RewriteRule .* %1/%2 [R=301,L]
19+
20+
# Redirect /index.php to /
21+
RewriteCond %{THE_REQUEST} ^.*\ /index\.(?:php|htm|html)(\?.*)?\ HTTP/
22+
RewriteRule ^.*$ /%1 [R=301,L]
23+
24+
RewriteCond %{REQUEST_FILENAME} !-f
25+
RewriteCond %{REQUEST_FILENAME} !-d
26+
RewriteRule . /index.php [L]
27+
</IfModule>
28+
</Directory>
29+
</VirtualHost>

docker/configs/php.ini

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
short_open_tag = On
2+
; Display PHP version to header
3+
; http://php.net/expose-php
4+
expose_php = Off
5+
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
6+
; Development Value: E_ALL
7+
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
8+
error_reporting = E_ALL
9+
10+
; Default Value: On
11+
; Development Value: On
12+
; Production Value: Off
13+
display_errors = On
14+
15+
variables_order = "EGPCS"
16+
default_charset = "UTF-8"
17+
18+
post_max_size = 25M
19+
upload_max_filesize = 20M

docker/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
source /etc/apache2/envvars
4+
exec apache2 -D FOREGROUND

0 commit comments

Comments
 (0)