summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-10 10:31:15 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-10 10:31:15 +0200
commitb9886868f8bf5feb8db244e659cf4cf197ddb792 (patch)
tree13d331b5919f46358b27c21ad743c1100c1c53f3
parent6b7cce63effcfd247f21a1324a81c38118cdd58a (diff)
Add docker-compose file
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--docker/README.md7
-rw-r--r--docker/docker-compose.yml25
2 files changed, 32 insertions, 0 deletions
diff --git a/docker/README.md b/docker/README.md
index d6b4af480..560a9544b 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -27,5 +27,12 @@ The PHP webserver is listening on ```8080```
The first user is **admin** with the password **admin**
## Run
+
+### with docker-compose
+```bash
+docker-compose build
+docker-compose up
+```
+
### with linked mysql/mariadb database server
```docker run -ti --rm -p <port>:8080 --link mdb:mysql -e FB_DB_HOSTNAME=mysql -e FB_DB_USERNAME=filebin_usr -e FB_DB_PASSWORD=test -e FB_DB_DATABASE=filebin -e FB_CONTACT_NAME="John Doe" -e FB_CONTACT_MAIL="john.doe@localmail.local" sebastianrakel/filebin```
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
new file mode 100644
index 000000000..72efba67c
--- /dev/null
+++ b/docker/docker-compose.yml
@@ -0,0 +1,25 @@
+version: '2'
+services:
+ mysql:
+ image: mysql
+ environment:
+ - MYSQL_DATABASE=filebin
+ - MYSQL_USER=filebin
+ # TODO: can this be set to a random password?
+ - MYSQL_PASSWORD=filebin-docker-demo
+ - MYSQL_RANDOM_ROOT_PASSWORD=yes
+
+ filebin:
+ links:
+ - mysql
+ build: .
+ ports:
+ - "8080:8080"
+ environment:
+ - FB_DB_HOSTNAME=mysql
+ - FB_DB_USERNAME=filebin
+ - FB_DB_PASSWORD=filebin-docker-demo
+ - FB_DB_DATABASE=filebin
+ - FB_CONTACT_NAME=John Doe
+ - FB_CONTACT_MAIL=root@example.local
+