From 049baed7cf5ca01af83e91a0c91f80377cc6bb6b Mon Sep 17 00:00:00 2001 From: Kun Ran Date: Sat, 26 Nov 2016 18:01:33 +0800 Subject: [PATCH 1/3] Add docker and docker-compose configuration. Add docker configuration. Add docker-compose config file. Fix ea_data path error. Add example command. --- Dockerfile | 7 +++++++ docker-compose.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..bd68ba9d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM tutum/apache-php + +MAINTAINER Kun Ran + +# Note: this only exposes the port to other docker containers. You +# still have to bind to 80@host at runtime, as per the ACME spec. +EXPOSE 80 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..259688d2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,29 @@ +# Easy!Appointments +# docker-compose up ea +ea_data: + image: 'busybox:latest' + volumes: + - /var/lib/mysql + - ./src:/app + command: sleep 3153600000 +ea_db: + environment: + MYSQL_ROOT_PASSWORD: supersecret + MYSQL_DATABASE: easyappts + image: mysql:5.7 + volumes_from: + - ea_data + ports: + - 8003:3306 + restart: always + mem_limit: 200m +ea: + build: ./ + ports: + - 8001:80 + - 8002:9000 + links: + - ea_db:ea_db + volumes_from: + - ea_data +# Easy!Appointments end From e1ee54c7fe779d8c9fedcc7d46adb72733172912 Mon Sep 17 00:00:00 2001 From: Kun Ran Date: Sat, 3 Dec 2016 10:33:56 +0800 Subject: [PATCH 2/3] Remove unsafe ports --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 259688d2..5c7764b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,15 +13,15 @@ ea_db: image: mysql:5.7 volumes_from: - ea_data - ports: - - 8003:3306 + # ports: + # - 8003:3306 restart: always mem_limit: 200m ea: build: ./ ports: - 8001:80 - - 8002:9000 + # - 8002:9000 links: - ea_db:ea_db volumes_from: From ac01f41ab7c9c1779a82e44d593338ea92b7cf3e Mon Sep 17 00:00:00 2001 From: alext Date: Mon, 16 Jan 2017 23:33:27 +0100 Subject: [PATCH 3/3] Edited docker configuration. --- Dockerfile | 4 +--- docker-compose.yml | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd68ba9d..2545f434 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM tutum/apache-php -MAINTAINER Kun Ran +MAINTAINER Alex Tselegidis -# Note: this only exposes the port to other docker containers. You -# still have to bind to 80@host at runtime, as per the ACME spec. EXPOSE 80 diff --git a/docker-compose.yml b/docker-compose.yml index 5c7764b3..7a63f0f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,29 +1,23 @@ -# Easy!Appointments -# docker-compose up ea -ea_data: +storage: image: 'busybox:latest' volumes: - /var/lib/mysql - ./src:/app command: sleep 3153600000 -ea_db: - environment: - MYSQL_ROOT_PASSWORD: supersecret - MYSQL_DATABASE: easyappts +database: image: mysql:5.7 + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: easyappointments volumes_from: - - ea_data - # ports: - # - 8003:3306 + - storage restart: always mem_limit: 200m -ea: +app: build: ./ ports: - - 8001:80 - # - 8002:9000 + - 80:80 links: - - ea_db:ea_db + - database:database volumes_from: - - ea_data -# Easy!Appointments end + - storage