|
@@ -1,36 +1,15 @@
|
|
|
-# Docker-compose example
|
|
|
+# GE Dev environment
|
|
|
|
|
|
-This is a quick example that allows live development on a server. This is very basic and lacks a number of features that would be on an average site (eg fastcgi, redis, etc).
|
|
|
+All you need to do is run `docker-compose up`. Changes are live from the src/ folder. Any DB changes arent saved in this version. set a folder to mount somewhere:/var/lib/mysql/:rw to persist; or edit the db init scripts to get what you want.
|
|
|
|
|
|
-It is accessible on `localhost:80`
|
|
|
+##prereqs
|
|
|
+docker (and associated prereqs for that)
|
|
|
+docker-compose
|
|
|
|
|
|
-## db folder
|
|
|
+tested on fedora/centos fine. Should be fine with any *nix system.
|
|
|
|
|
|
-- Contains create_database.sql
|
|
|
+##windows
|
|
|
|
|
|
-This is standard sql to create a database to work off. In the example of cloudM, you'd have an SQL dump or such here to populate the DB. This is referenced in `docker-compose.yaml`
|
|
|
+Stop being weird, get linux.
|
|
|
|
|
|
-```docker-compose.yaml
|
|
|
-volumes:
|
|
|
- - "./db/:/docker-entrypoint-initdb.d"
|
|
|
-```
|
|
|
-With the specific image used (mysql:5.7) anything placed in the container at docker-entrypoint-initdb.d will be ran as sql files when the database has been created.
|
|
|
-
|
|
|
-## src
|
|
|
-
|
|
|
-Code lives here. The example here is a simple php file to pull some data from the DB and display it. it is mounted in the docker-compose.yaml so thus can edited on-the-fly without restarts.
|
|
|
-
|
|
|
-## docker-compose.yaml
|
|
|
-
|
|
|
-defines how everything meshes together. run the command `docker-compose up` to bring it all live, with down to tear it away.
|
|
|
-
|
|
|
-```docker-compose.yaml
|
|
|
- build:
|
|
|
- context: .
|
|
|
- dockerfile: web-dockerfile
|
|
|
-```
|
|
|
-This defines that the image will be built from a file within the current directory, with web-dockerfile being the Dockerfile.
|
|
|
-
|
|
|
-## web-dockerfile
|
|
|
-
|
|
|
-Creates the docker image. It uses an image from the dockerhub, updates and then enables the mysqli module for php to allow connections. The command `docker-php-ext-install X' is provided by the creators of the docker image.
|
|
|
+It may work if you use win10's linux sub-system (WSL) - though I haven't used it personally so dont know how good it actually is.
|