Skip to content
Permalink
Browse files
Some basic setup stuff added
  • Loading branch information
aa9863 committed Mar 17, 2021
1 parent 60f49d6 commit 0dcc9ebd0fd73c079196a87134c50fb3b4133ac0
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 18 deletions.
@@ -0,0 +1,7 @@
<h1>It Works</h1>

<p>Bleh</p>

<?php
phpinfo();
?>
@@ -5,3 +5,69 @@ Lets us the classic LAMP stack:

- Apache / PHP
- MySQL

## Notes

We have two ways of working with this.

- Development mode: Lets is work with a "Live" version of the site
- Deploy Mode: "Bakes" the site into a single image.


I tend to work with the development version, as it lets me bugger
around and get everything setup.

When its time to deploy, I then build a deploy version, with the
content "baked" into the image. This means that we have our final cut
of the machine can be recreated at any time.

## Compose Files

We can start things up with the docker-compose files. This will build
a "stack" of docker images, with PHP and mySQL. Items in the stack
are segregated from the base OS, bt can talk to each other, like they
are on the same machine.

- **devel-compose.yaml** Development version, use this for testing.

- **deploy-compose.yaml** The Deploy version of the site. I would
rename this to docker-compose when you are ready to go


## Working with It.

For development start the version

```
docker-compose -f devel-compose up
```

For deploy you need to

```
docker-compose -f deploy-compose build
docker-compose -f deploy-compose up
```

### Convenience

When it comes to deploy time (or for convenience)
you might want to link the version you are working with to be called docker-compose
This lets you start and stop the service without specifing the compose file

For example you can do this to work with the development version by defaul

```
ln -s devel-compose.yaml docker-compose.yaml
#Then start with
docker-compose up
```


# Dvelopment

The PHP stuff live in ```PHP/content``` use this as the equivilent of the ```/var/www/html```

- I have stuck an index.php file in there,
- conn.php is giving an example of connecting to the database

This file was deleted.

0 comments on commit 0dcc9eb

Please sign in to comment.