Docker was used to host this website. You may use your own preferred method.
- Install Docker: https://docs.docker.com/engine/install/
- Follow "Configuration" & "SSL/HTTPS" Apache Docker image instructions here: https://hub.docker.com/_/httpd/
Docker requires preparation of the following files before proceeding further:
httpd.conf
- Required for SSL setup only (docker only).
server.crt
- Requires public key. Generated using certbot. Use your own preferred certificate signing method.
server.key
- Requires private key. Use your own preferred certificate signing method.
- Download source code into a preferred local directory.
- Place updated
httpd.conf
file in:/usr/local/apache2/conf/
- Place certificate files in:
/usr/local/apache2/conf/
- Run website with one command:
docker run -dit --name tradescape.cash -p 80:80 -p 443:443 -v "$PWD":/usr/local/apache2/htdocs/ -v /usr/local/apache2/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf -v /usr/local/apache2/conf/server.crt:/usr/local/apache2/conf/server.crt -v /usr/local/apache2/conf/server.key:/usr/local/apache2/conf/server.key httpd:2.4
NOTE: When performing website source code updates and the source is updated on the host $PWD
, the docker container volume bind mount will cause the container to automatically update the website content, no other action is required.
Docker image can run on any OS. Update your local path to reflect your local directory for source, httpd.conf file and certificate locations.
X:\where-your-source-is-located\
instead of $PWD
X:\path-to-httpd.conf-and-certs\conf\
instead of /usr/local/apache2/conf/
Stop website container
docker stop tradescape.cash
Start website container again, existing container
docker start tradescape.cash
Remove docker container, source code on host is untouched. Must stop before removing.
docker rm tradescape.cash