Skip to content

Commit

Permalink
Merge pull request #76 from palfrey/fix-build
Browse files Browse the repository at this point in the history
Lockdown redis/postgres versions to fix build
  • Loading branch information
palfrey authored Mar 5, 2020
2 parents 9e0cffa + 8259b2c commit a6ad961
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Setup
-----
1. [Install Dokku](http://dokku.viewdocs.io/dokku/getting-started/installation)
2. Install the following plugins:
* https://github.com/dokku/dokku-redis
* https://github.com/dokku/dokku-postgres
* https://github.com/dokku/dokku-redis (versions up to 1.10.4, see #75)
* https://github.com/dokku/dokku-postgres (versions up to 1.9.5, see #75)
* https://github.com/dokku/dokku-letsencrypt
3. Setup the Let's Encrypt plugin to auto-renew (`dokku letsencrypt:cron-job --add`)
4. Create the app (`dokku apps:create wharf`)
Expand Down
13 changes: 10 additions & 3 deletions check_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import sys
import os
from subprocess import Popen, PIPE, STDOUT, run, check_call, check_output, CalledProcessError
Expand Down Expand Up @@ -52,6 +53,8 @@ def wait_for_one(self, locators):

def failure(self):
self.driver.get_screenshot_as_file("screenshot.png")
print(self.driver.page_source)
os.system("docker logs wharf.web.1")

def get(self, url):
self.log("Went to %s" % url)
Expand All @@ -66,9 +69,13 @@ def click(self, strat, id):
return self.find_element(strat, id).click()

def wait_for_list(self, items):
return WebDriverWait(self.driver, 10).until(
lambda driver: self.wait_for_one(items)
)
try:
return WebDriverWait(self.driver, 10).until(
lambda driver: self.wait_for_one(items)
)
except TimeoutException:
self.failure()
raise

def get_main_id(self):
res = self.wait_for_list([(By.ID, "initial-setup-header"), (By.ID, "list_apps")])
Expand Down
5 changes: 3 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ fi
echo dokku dokku/skip_key_file boolean true | sudo debconf-set-selections
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y dokku
sudo dokku plugin:install-dependencies --core
(dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis
(dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
(dokku plugin:list | grep redis) || sudo dokku plugin:install https://github.com/dokku/dokku-redis.git --committish 1.10.4 redis
(dokku plugin:list | grep postgres) || sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 1.9.5 postgres
(dokku plugin:list | grep letsencrypt) || sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
dokku plugin:list
dokku letsencrypt:cron-job --add
(dokku apps:list | grep wharf) || dokku apps:create wharf
(dokku redis:list | grep wharf) || (dokku redis:create wharf && dokku redis:link wharf wharf)
Expand Down

0 comments on commit a6ad961

Please sign in to comment.