From b9886868f8bf5feb8db244e659cf4cf197ddb792 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 10 Jul 2016 10:31:15 +0200 Subject: Add docker-compose file Signed-off-by: Florian Pritz --- docker/README.md | 7 +++++++ docker/docker-compose.yml | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 docker/docker-compose.yml (limited to 'docker') 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 :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 + -- cgit v1.2.3-24-g4f1b