diff --git a/Dockerfile b/Dockerfile index 15fc790..c3caa51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,9 +37,9 @@ RUN source /opt/postmaster/env/bin/activate && python manage.py clean RUN chown -R www-data:www-data /opt/postmaster RUN chmod +x /opt/postmaster/git/ops/docker.sh RUN /usr/sbin/a2dissite 000-default.conf -RUN cp -f ops/apache.conf /etc/apache2/sites-available/postmaster.conf +RUN cp -f ops/ansible/roles/postmaster_deploy/files/apache2/apache.conf /etc/apache2/sites-available/postmaster.conf RUN /usr/sbin/a2ensite postmaster.conf -EXPOSE 80 +EXPOSE 8082 ENTRYPOINT /opt/postmaster/git/ops/docker.sh diff --git a/docs/Installation/Docker.md b/docs/Installation/Docker.md index c80cfff..5670f5b 100644 --- a/docs/Installation/Docker.md +++ b/docs/Installation/Docker.md @@ -59,7 +59,7 @@ The -p has the Docker host serve port 80 of the PostMaster container. Change thi The -e specifies the value of the DB_URI environment variable, which is the URI that PostMaster will use to connect to your mail server's MySQL server. Make sure to replace 'password_changeme' and 'docker.postmaster.local' with what you configured in step 2 of MySQL Preparation: - docker run -p 0.0.0.0:80:80 -v /opt/postmaster_data:/opt/postmaster/git/db \ + docker run -p 0.0.0.0:80:8082 -v /opt/postmaster_data:/opt/postmaster/git/db \ -e DB_URI=mysql://postmasteruser:password_changeme@docker.postmaster.local:3306/servermail -d postmaster 7. PostMaster should now be running. Simply use the username "admin" and the password "PostMaster" to login. diff --git a/docs/Installation/Ubuntu 14.04.md b/docs/Installation/Ubuntu 14.04.md index 641274e..84920be 100644 --- a/docs/Installation/Ubuntu 14.04.md +++ b/docs/Installation/Ubuntu 14.04.md @@ -23,12 +23,27 @@ bind-address is set 0.0.0.0 and not 127.0.0.1 in: /etc/mysql/my.cnf -### Installation +### Package Installation +The PostMaster package can be found on Bintray at [https://bintray.com/stackfocus/deb/PostMaster](https://bintray.com/stackfocus/deb/PostMaster) + +This installation method works best on a fresh installation of the operating system. + +1. Run this command to add to the `/etc/apt/sources.list`: + + echo "deb https://dl.bintray.com/stackfocus/deb {distribution} {components}" | sudo tee -a /etc/apt/sources.list + +2. Install the PostMaster package: + + apt-get update && apt-get install postmaster + +3. PostMaster should now be running on port 8082. Simply use the username "admin" and the password "PostMaster" to login. You can change your username and password from Manage -> Administrators. + +### Manual Installation 1. Switch to the server that will host PostMaster if applicable, and login as root: sudo su - -2. Update the apititude package list: +2. Update the aptitude package list: apt-get update @@ -71,7 +86,7 @@ replace '127.0.0.1' with the IP address or DNS specified in step 2 of MySQL Prep cd /opt/postmaster/git python manage.py setdburi 'mysql://postmasteruser:password_changeme@127.0.0.1:3306/servermail' - + 11. PostMaster needs to create a few tables under the servermail database. This is done via a database migration, which means that only the necessary changes to the database are made, and these changes are reversible if something went wrong. To start the migration, run the following command: @@ -85,7 +100,7 @@ To start the migration, run the following command: 13. You may now exit from the python virtual environment: deactivate - + 14. Provide the proper permissions on the PostMaster files: chown -R www-data:www-data /opt/postmaster