Difference between revisions of "ProxCP Daemon w/ Docker"

From ProxCP Documentation
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
ProxCP Daemon v1.5 or higher now supports [https://www.docker.com/ Docker]. Docker allows ProxCP Daemon to run in its own container independent of other software. This makes management and updating very simple.
 
ProxCP Daemon v1.5 or higher now supports [https://www.docker.com/ Docker]. Docker allows ProxCP Daemon to run in its own container independent of other software. This makes management and updating very simple.
  
The ProxCP Daemon docker image includes NodeJS, PHP, Apache, MariaDB/MySQL client, and ProxCP Daemon all installed on Debian 10.
+
The [https://hub.docker.com/r/proxcp/proxcp-daemon-v17-nodev12 ProxCP Daemon docker image] includes NodeJS, PHP, Apache, MariaDB/MySQL client, and ProxCP Daemon all installed on Debian 10.
  
 
== Steps ==
 
== Steps ==
  
 
# Install docker engine on the host server ([https://docs.docker.com/engine/install/ how?])
 
# Install docker engine on the host server ([https://docs.docker.com/engine/install/ how?])
# Once completed, pull the ProxCP Daemon image with <code>docker pull proxcp/proxcp-daemon-v15-nodev12</code>
+
# Once completed, pull the ProxCP Daemon image with <code>docker pull proxcp/proxcp-daemon-v17-nodev12</code>
 
# Confirm you see the new image with <code>docker images</code>
 
# Confirm you see the new image with <code>docker images</code>
# Start a new docker container from the ProxCP Daemon image <code>docker run --name daemon -p 80:80 -p 8000:8000 -d proxcp/proxcp-daemon-v15-nodev12</code>
+
# Start a new docker container from the ProxCP Daemon image <code>docker run --name daemon -p 80:80 -p 8000:8000 -d proxcp/proxcp-daemon-v17-nodev12</code>
 
# You should now see a running container <code>docker ps</code>
 
# You should now see a running container <code>docker ps</code>
 
# Enter the container <code>docker exec -it daemon /bin/bash</code>
 
# Enter the container <code>docker exec -it daemon /bin/bash</code>
# You are now dropped into the container as root in /etc/proxcp. From here, run <code>./proxcp-daemon</code> to complete initial ProxCP Daemon configuration
+
# You are now dropped into the container as root in /etc/proxcp. From here, run <code>./proxcp-daemon</code> to complete initial ProxCP Daemon configuration. Note that the ProxCP Daemon MySQL settings should match the ProxCP Web MySQL settings (they should share 1 database).
 
# After setup, kill the Daemon with ^C (Ctrl-C) and make it persistent with <code>forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh</code>
 
# After setup, kill the Daemon with ^C (Ctrl-C) and make it persistent with <code>forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh</code>
 +
# You can now exit the container and the Daemon will continue running; verify with <code>docker ps</code>
  
 
== Notes ==
 
== Notes ==

Latest revision as of 15:15, 2 October 2021

ProxCP Daemon v1.5 or higher now supports Docker. Docker allows ProxCP Daemon to run in its own container independent of other software. This makes management and updating very simple.

The ProxCP Daemon docker image includes NodeJS, PHP, Apache, MariaDB/MySQL client, and ProxCP Daemon all installed on Debian 10.

Steps

  1. Install docker engine on the host server (how?)
  2. Once completed, pull the ProxCP Daemon image with docker pull proxcp/proxcp-daemon-v17-nodev12
  3. Confirm you see the new image with docker images
  4. Start a new docker container from the ProxCP Daemon image docker run --name daemon -p 80:80 -p 8000:8000 -d proxcp/proxcp-daemon-v17-nodev12
  5. You should now see a running container docker ps
  6. Enter the container docker exec -it daemon /bin/bash
  7. You are now dropped into the container as root in /etc/proxcp. From here, run ./proxcp-daemon to complete initial ProxCP Daemon configuration. Note that the ProxCP Daemon MySQL settings should match the ProxCP Web MySQL settings (they should share 1 database).
  8. After setup, kill the Daemon with ^C (Ctrl-C) and make it persistent with forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh
  9. You can now exit the container and the Daemon will continue running; verify with docker ps

Notes

  • The container includes Apache running on port 80 for Let's Encrypt SSL verification. Apache must always be running for the docker container to remain active.
  • Be sure to run the Daemon with forever after initial setup to make the process persistent.
  • The container exposes port 8000 for the Daemon by default. This can be changed if necessary.
  • In general, you should use 0.0.0.0 as the public IP address of the Daemon during setup.
  • Exposed Container Ports:
    • 80: required, not editable, Apache
    • 8000: required, editable, Daemon
    • Other ports can be added if necessary, such as if you're using SMTP for outbound email from the Daemon