aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/mariadb/env10
-rw-r--r--docker/nginx/nginx.conf89
-rw-r--r--docker/php/Dockerfile10
-rw-r--r--docker/php/env6
-rw-r--r--docker/postgres/env9
5 files changed, 124 insertions, 0 deletions
diff --git a/docker/mariadb/env b/docker/mariadb/env
new file mode 100644
index 00000000..87556a15
--- /dev/null
+++ b/docker/mariadb/env
@@ -0,0 +1,10 @@
1MYSQL_ROOT_PASSWORD=wallaroot
2MYSQL_USER=wallabag
3MYSQL_PASSWORD=wallapass
4MYSQL_DATABASE=wallabag
5SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
6SYMFONY__ENV__DATABASE_HOST=rdbms
7SYMFONY__ENV__DATABASE_PORT=3306
8SYMFONY__ENV__DATABASE_NAME=wallabag
9SYMFONY__ENV__DATABASE_USER=wallabag
10SYMFONY__ENV__DATABASE_PASSWORD=wallapass
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf
new file mode 100644
index 00000000..7e82a0f8
--- /dev/null
+++ b/docker/nginx/nginx.conf
@@ -0,0 +1,89 @@
1user nginx;
2worker_processes 1;
3pid /var/run/nginx.pid;
4
5events {
6 worker_connections 2048;
7 multi_accept on;
8 use epoll;
9}
10
11http {
12
13 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
14 '$status $body_bytes_sent "$http_referer" '
15 '"$http_user_agent" "$http_x_forwarded_for"';
16
17 access_log /var/log/nginx/access.log main;
18
19 server_tokens off;
20 sendfile on;
21 tcp_nopush on;
22 tcp_nodelay on;
23 keepalive_timeout 15;
24 types_hash_max_size 2048;
25 include /etc/nginx/mime.types;
26 default_type application/octet-stream;
27 access_log off;
28 error_log off;
29 gzip on;
30 gzip_disable "msie6";
31 open_file_cache max=100;
32
33
34 upstream php-upstream {
35 server php:9000;
36 }
37
38 server {
39 #server_name domain.tld www.domain.tld;
40 root /var/www/html/web;
41
42 location / {
43 # try to serve file directly, fallback to app.php
44 try_files $uri /app.php$is_args$args;
45 }
46 # DEV
47 # This rule should only be placed on your development environment
48 # In production, don't include this and don't deploy app_dev.php or config.php
49 location ~ ^/(app_dev|config)\.php(/|$) {
50 fastcgi_pass php-upstream;
51 fastcgi_split_path_info ^(.+\.php)(/.*)$;
52 include fastcgi_params;
53 # When you are using symlinks to link the document root to the
54 # current version of your application, you should pass the real
55 # application path instead of the path to the symlink to PHP
56 # FPM.
57 # Otherwise, PHP's OPcache may not properly detect changes to
58 # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
59 # for more information).
60 fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
61 fastcgi_param DOCUMENT_ROOT $realpath_root;
62 }
63 # PROD
64 location ~ ^/app\.php(/|$) {
65 fastcgi_pass php-upstream;
66 fastcgi_split_path_info ^(.+\.php)(/.*)$;
67 include fastcgi_params;
68 # When you are using symlinks to link the document root to the
69 # current version of your application, you should pass the real
70 # application path instead of the path to the symlink to PHP
71 # FPM.
72 # Otherwise, PHP's OPcache may not properly detect changes to
73 # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
74 # for more information).
75 fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
76 fastcgi_param DOCUMENT_ROOT $realpath_root;
77 # Prevents URIs that include the front controller. This will 404:
78 # http://domain.tld/app.php/some-path
79 # Remove the internal directive to allow URIs like this
80 internal;
81 }
82
83 error_log /var/log/nginx/project_error.log;
84 access_log /var/log/nginx/project_access.log;
85 }
86
87}
88
89daemon off;
diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile
new file mode 100644
index 00000000..7c56ae57
--- /dev/null
+++ b/docker/php/Dockerfile
@@ -0,0 +1,10 @@
1FROM php:fpm
2
3RUN apt-get update && apt-get install -y \
4 libmcrypt-dev libicu-dev libpq-dev libxml2-dev \
5 && docker-php-ext-install \
6 iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql
7
8RUN usermod -u 1000 www-data
9
10CMD ["php-fpm"]
diff --git a/docker/php/env b/docker/php/env
new file mode 100644
index 00000000..935134fc
--- /dev/null
+++ b/docker/php/env
@@ -0,0 +1,6 @@
1SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite
2SYMFONY__ENV__DATABASE_HOST=127.0.0.1
3SYMFONY__ENV__DATABASE_PORT=~
4SYMFONY__ENV__DATABASE_NAME=symfony
5SYMFONY__ENV__DATABASE_USER=root
6SYMFONY__ENV__DATABASE_PASSWORD=~
diff --git a/docker/postgres/env b/docker/postgres/env
new file mode 100644
index 00000000..80c78c2a
--- /dev/null
+++ b/docker/postgres/env
@@ -0,0 +1,9 @@
1POSTGRES_USER=wallabag
2POSTGRES_PASSWORD=wallapass
3POSTGRES_DB=wallabag
4export SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
5export SYMFONY__ENV__DATABASE_HOST=rdbms
6export SYMFONY__ENV__DATABASE_PORT=5432
7export SYMFONY__ENV__DATABASE_NAME=wallabag
8export SYMFONY__ENV__DATABASE_USER=wallabag
9export SYMFONY__ENV__DATABASE_PASSWORD=wallapass