diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | app/config/parameters.yml.dist | 10 | ||||
-rw-r--r-- | docker-compose.yml | 25 | ||||
-rw-r--r-- | docker/mariadb/env | 10 | ||||
-rw-r--r-- | docker/php/env | 6 | ||||
-rw-r--r-- | docker/postgres/env | 9 |
6 files changed, 62 insertions, 1 deletions
@@ -37,5 +37,6 @@ | |||
37 | data/assets/* | 37 | data/assets/* |
38 | data/db/wallabag*.sqlite | 38 | data/db/wallabag*.sqlite |
39 | 39 | ||
40 | # Docker container logs | 40 | # Docker container logs and data |
41 | docker/logs/ | 41 | docker/logs/ |
42 | docker/data/ | ||
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index a769bc66..0c0cbff1 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -1,5 +1,15 @@ | |||
1 | # This file is a "template" of what your parameters.yml file should look like | 1 | # This file is a "template" of what your parameters.yml file should look like |
2 | parameters: | 2 | parameters: |
3 | # Uncomment these settings or manually update your parameters.yml | ||
4 | # to use docker-compose | ||
5 | # | ||
6 | # database_driver: %env.database_driver% | ||
7 | # database_host: %env.database_host% | ||
8 | # database_port: %env.database_port% | ||
9 | # database_name: %env.database_name% | ||
10 | # database_user: %env.database_user% | ||
11 | # database_password: %env.database_password% | ||
12 | |||
3 | database_driver: pdo_sqlite | 13 | database_driver: pdo_sqlite |
4 | database_host: 127.0.0.1 | 14 | database_host: 127.0.0.1 |
5 | database_port: ~ | 15 | database_port: ~ |
diff --git a/docker-compose.yml b/docker-compose.yml index bc469419..c774b621 100644 --- a/docker-compose.yml +++ b/docker-compose.yml | |||
@@ -15,3 +15,28 @@ php: | |||
15 | - "9000:9000" | 15 | - "9000:9000" |
16 | volumes: | 16 | volumes: |
17 | - .:/var/www/html | 17 | - .:/var/www/html |
18 | #links: | ||
19 | # - "postgres:rdbms" | ||
20 | # - "mariadb:rdbms" | ||
21 | env_file: | ||
22 | - ./docker/php/env | ||
23 | # Comment non-used DBMS lines | ||
24 | # If all DBMS are commented out, sqlite will be used as default | ||
25 | # - ./docker/postgres/env | ||
26 | # - ./docker/mariadb/env | ||
27 | #postgres: | ||
28 | # image: postgres:9 | ||
29 | # ports: | ||
30 | # - "5432:5432" | ||
31 | # volumes: | ||
32 | # - ./docker/data/pgsql:/var/lib/postgresql/data | ||
33 | # env_file: | ||
34 | # - ./docker/postgres/env | ||
35 | #mariadb: | ||
36 | # image: mariadb:10 | ||
37 | # ports: | ||
38 | # - "3306:3306" | ||
39 | # volumes: | ||
40 | # - ./docker/data/mariadb:/var/lib/mysql | ||
41 | # env_file: | ||
42 | # - ./docker/mariadb/env | ||
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 @@ | |||
1 | MYSQL_ROOT_PASSWORD=wallaroot | ||
2 | MYSQL_USER=wallabag | ||
3 | MYSQL_PASSWORD=wallapass | ||
4 | MYSQL_DATABASE=wallabag | ||
5 | SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql | ||
6 | SYMFONY__ENV__DATABASE_HOST=rdbms | ||
7 | SYMFONY__ENV__DATABASE_PORT=3306 | ||
8 | SYMFONY__ENV__DATABASE_NAME=wallabag | ||
9 | SYMFONY__ENV__DATABASE_USER=wallabag | ||
10 | SYMFONY__ENV__DATABASE_PASSWORD=wallapass | ||
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 @@ | |||
1 | SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite | ||
2 | SYMFONY__ENV__DATABASE_HOST=127.0.0.1 | ||
3 | SYMFONY__ENV__DATABASE_PORT=~ | ||
4 | SYMFONY__ENV__DATABASE_NAME=symfony | ||
5 | SYMFONY__ENV__DATABASE_USER=root | ||
6 | SYMFONY__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 @@ | |||
1 | POSTGRES_USER=wallabag | ||
2 | POSTGRES_PASSWORD=wallapass | ||
3 | POSTGRES_DB=wallabag | ||
4 | export SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql | ||
5 | export SYMFONY__ENV__DATABASE_HOST=rdbms | ||
6 | export SYMFONY__ENV__DATABASE_PORT=5432 | ||
7 | export SYMFONY__ENV__DATABASE_NAME=wallabag | ||
8 | export SYMFONY__ENV__DATABASE_USER=wallabag | ||
9 | export SYMFONY__ENV__DATABASE_PASSWORD=wallapass | ||