|
|
|
@@ -1,6 +1,16 @@ |
|
|
|
# contao-docker-test |
|
|
|
|
|
|
|
#Installation: |
|
|
|
- Create a new folder "cert" in project root, enter it in terminal and create SSL-certificate files: |
|
|
|
- `openssl req -x509 -new -out mycert.crt -keyout mycert.key -days 365 -newkey rsa:4096 -sha256 -nodes` |
|
|
|
- Enter a name for your local domain name e.g. "local-docker" as "Common Name", all other information are not relevant |
|
|
|
and you can skip them with enter |
|
|
|
- Make sure your local domain name is entered in the host file |
|
|
|
(Unix, Mac: /etc/hosts | Windows: C:\Windows\System32\drivers\etc\hosts) like this: |
|
|
|
"127.0.0.1 localhost local-docker" |
|
|
|
- Later when the app is ready you can use this domain name to call with the browser |
|
|
|
- A full guide is here: |
|
|
|
[SSL Docker Installation](https://forums.docker.com/t/setup-local-domain-and-ssl-for-php-apache-container/116015) |
|
|
|
- Start docker app (e.g. Docker Desktop) |
|
|
|
- Go to root folder in terminal and create docker containers: `docker-compose up -d` |
|
|
|
- Create a database for contao in database container: |
|
|
|
@@ -78,6 +88,11 @@ |
|
|
|
- `docker rmi $(docker images -q)` |
|
|
|
- `docker stop contao && docker rm contao && docker rmi php-apache-contao && docker-compose up -d` |
|
|
|
|
|
|
|
# Some helpful other commands: |
|
|
|
- Restart Apache within the container |
|
|
|
- Go into docker container `docker exec -it contao /bin/bash` |
|
|
|
- Apache restart `sudo /etc/init.d/apache2 reload` |
|
|
|
|
|
|
|
# Clean restart of Docker instance |
|
|
|
1. Stop the container(s) using the following command: `docker-compose down` |
|
|
|
2. Delete all containers using the following command: `docker rm -f $(docker ps -a -q)` |
|
|
|
|