Skip to content

Commit

Permalink
Turnerd patch 1 (#781)
Browse files Browse the repository at this point in the history
Update README.md

Co-authored-by: Ben Lynch <[email protected]>
  • Loading branch information
turnerd and blynchNDI authored Jan 13, 2021
1 parent e225cb3 commit da9387d
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ SSL_REQUIRED=False

In order to simplify the deployment process, Apollo now includes a docker compose application configuration to allow admins skip the entire process of having to start the database, task queue, worker and main application containers individually.

To build and start the application, simply run:
To build and start the application, simply run (from within the main folder):

`make docker`
`sudo docker-compose up -d`

The main application container and worker containers will be built and run together with the supporting database and task queue containers. After running the command initially, subsequent builds will use cached container images. To deploy the code from scratch without drawing upon the cached images (for example to incorporate subsequent any changes made to the Apollo code outside of the docker containers), run `docker-compose build --no-cache`.
The main application container and worker containers will be built and run together with the supporting database and task queue containers. After running the command initially, subsequent builds will use cached container images. To see which containers are running, use `sudo docker ps`.

To deploy the code from scratch without drawing upon the cached images (for example to incorporate subsequent any changes made to the Apollo code outside of the docker containers), run `docker-compose build --no-cache`.



Expand All @@ -68,7 +70,7 @@ After deploying the containers, the Apollo application can be accessed by config

`ln -s /etc/nginx/sites-available/apollo /etc/nginx/sites-enabled/apollo`

Then edit the apollo file in `sites-available` with Nginx configurations. A sample file is shown below, with INSERT_SITE_URL indicating places in which the site url should be substituted in.
Then edit the apollo file in `sites-available` with Nginx configurations. A sample file is shown below. Replace INSERT_SITE_URL with the url for your site (replace INSERT_SITE_URL in both places). Insert your ssl crt at /etc/ssl/certs/ssl.crt and your ssl key at /etc/ssl/certs/ssl.key.

```
server {
Expand All @@ -84,7 +86,7 @@ server {
server_name INSERT_SITE_URL;
#limit_req zone=one burst=10 nodelay;
#limit_req_status 429;
ssl_trusted_certificate /etc/ssl/certs/demcloud_combined.crt;
ssl_trusted_certificate /etc/ssl/certs/ssl.crt;
location / {
proxy_pass http://localhost:5000;
Expand All @@ -98,17 +100,42 @@ server {
proxy_connect_timeout 300;
proxy_read_timeout 180;
}
ssl on;
ssl_certificate /etc/ssl/certs/ssl.crt;
ssl_certificate_key /etc/ssl/certs/ssl.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS +RC4 RC4";
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# make sure gzip does not lose large gzipped js or css files
# see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
gzip_buffers 16 8k;
# Disable gzip for certain browsers.
gzip_disable "MSIE [1-6].(?!.*SV1)";
}
```

After changing the file, restart nginx using `service nginx restart` (or `service nginx start` if it has not yet been started).

#### Logging in

You should now be able to login to your site by navigating to port `:5000` on your localhost or server (http://localhost:5000 or http://*server-ip-address*:5000). The default login is username: `admin` / password: `admin`. This can be changed upon logging in.
You should now be able to log in to your site by navigating to the IP or URL for your server, or if you are running it locally without nginx by going to port 5000 on your localhost (http://localhost:5000). The default login is username: `admin` / password: `admin`. This needs to be changed upon logging in.

### Application Configuration Settings

Each deployment installation can be further customized by modifying the contents of the `settings.ini` file. Here are a collection of settings parameters and sample values together with an explanation of what they do.
Each deployment installation can be further customized by modifying the contents of the `settings.ini` file. The syntax is for each setting to use the header listed below with an equal sign and then its value, for example `SSL_REQUIRED=False` or `TIMEZONE=Africa/Lagos`. Here are a collection of settings parameters and sample values together with an explanation of what they do.

**SECRET_KEY**
(e.g. LBZyd8EY80mALqb7bl8o3da8)
Expand Down

0 comments on commit da9387d

Please sign in to comment.