]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Add Docker configuration for Postgres and MariaDB
authorFabien MEURILLON <fabien@meurillon.org>
Sat, 9 Jan 2016 16:27:21 +0000 (17:27 +0100)
committerFabien MEURILLON <fabien@meurillon.org>
Sun, 10 Jan 2016 14:01:11 +0000 (15:01 +0100)
.gitignore
app/config/parameters.yml.dist
docker-compose.yml
docker/mariadb/env [new file with mode: 0644]
docker/php/env [new file with mode: 0644]
docker/postgres/env [new file with mode: 0644]

index 0495cb17d700e71fab70793fa84bc713f6de1107..f88370d78d5e7f65bb4f0449054cffab45d9bc86 100644 (file)
@@ -37,5 +37,6 @@
 data/assets/*
 data/db/wallabag*.sqlite
 
-# Docker container logs
+# Docker container logs and data
 docker/logs/
+docker/data/
index a769bc6638a2a6897f754f2268dbe94a287c4b9c..0c0cbff1cdc7a79be80a039e7663cea60bffaaa6 100644 (file)
@@ -1,5 +1,15 @@
 # This file is a "template" of what your parameters.yml file should look like
 parameters:
+    # Uncomment these settings or manually update your parameters.yml
+    # to use docker-compose
+    #
+    # database_driver: %env.database_driver%
+    # database_host: %env.database_host%
+    # database_port: %env.database_port%
+    # database_name: %env.database_name%
+    # database_user: %env.database_user%
+    # database_password: %env.database_password%
+
     database_driver: pdo_sqlite
     database_host: 127.0.0.1
     database_port: ~
index bc46941958e5e7995f7ac7ec0b4774f21d25d22b..c774b621717b213bc9a85c5aca28ae781d090bca 100644 (file)
@@ -15,3 +15,28 @@ php:
         - "9000:9000"
     volumes:
         - .:/var/www/html
+    #links:
+        # - "postgres:rdbms"
+        # - "mariadb:rdbms"
+    env_file:
+        - ./docker/php/env
+        # Comment non-used DBMS lines
+        # If all DBMS are commented out, sqlite will be used as default
+        # - ./docker/postgres/env
+        # - ./docker/mariadb/env
+#postgres:
+#    image: postgres:9
+#    ports:
+#        - "5432:5432"
+#    volumes:
+#        - ./docker/data/pgsql:/var/lib/postgresql/data
+#    env_file:
+#        - ./docker/postgres/env
+#mariadb:
+#    image: mariadb:10
+#    ports:
+#        - "3306:3306"
+#    volumes:
+#        - ./docker/data/mariadb:/var/lib/mysql
+#    env_file:
+#        - ./docker/mariadb/env
diff --git a/docker/mariadb/env b/docker/mariadb/env
new file mode 100644 (file)
index 0000000..87556a1
--- /dev/null
@@ -0,0 +1,10 @@
+MYSQL_ROOT_PASSWORD=wallaroot
+MYSQL_USER=wallabag
+MYSQL_PASSWORD=wallapass
+MYSQL_DATABASE=wallabag
+SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
+SYMFONY__ENV__DATABASE_HOST=rdbms
+SYMFONY__ENV__DATABASE_PORT=3306
+SYMFONY__ENV__DATABASE_NAME=wallabag
+SYMFONY__ENV__DATABASE_USER=wallabag
+SYMFONY__ENV__DATABASE_PASSWORD=wallapass
diff --git a/docker/php/env b/docker/php/env
new file mode 100644 (file)
index 0000000..935134f
--- /dev/null
@@ -0,0 +1,6 @@
+SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite
+SYMFONY__ENV__DATABASE_HOST=127.0.0.1
+SYMFONY__ENV__DATABASE_PORT=~
+SYMFONY__ENV__DATABASE_NAME=symfony
+SYMFONY__ENV__DATABASE_USER=root
+SYMFONY__ENV__DATABASE_PASSWORD=~
diff --git a/docker/postgres/env b/docker/postgres/env
new file mode 100644 (file)
index 0000000..80c78c2
--- /dev/null
@@ -0,0 +1,9 @@
+POSTGRES_USER=wallabag
+POSTGRES_PASSWORD=wallapass
+POSTGRES_DB=wallabag
+export SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
+export SYMFONY__ENV__DATABASE_HOST=rdbms
+export SYMFONY__ENV__DATABASE_PORT=5432
+export SYMFONY__ENV__DATABASE_NAME=wallabag
+export SYMFONY__ENV__DATABASE_USER=wallabag
+export SYMFONY__ENV__DATABASE_PASSWORD=wallapass