|
| 1 | +--- |
| 2 | +name: Bakerydemo GOLD v2.0 benchmark |
| 3 | +author: Arne Tarra <[email protected]> |
| 4 | +description: Testing all routes of the exemplary Bakery demo Gold v2.0 Benchmark with cache pre-warmed in build step |
| 5 | + |
| 6 | +compose-file: !include docker-compose.yml |
| 7 | + |
| 8 | +sci: |
| 9 | + R_d: page request |
| 10 | + |
| 11 | +services: |
| 12 | + db: |
| 13 | + # we need the DB fully booted. Therefore we wait here a little |
| 14 | + setup-commands: |
| 15 | + - sleep 10 |
| 16 | + |
| 17 | + app: |
| 18 | + environment: |
| 19 | + WAGTAILADMIN_BASE_URL: http://app:8000/admin/ |
| 20 | + build: |
| 21 | + context: . |
| 22 | + dockerfile: ./Dockerfile |
| 23 | + shell: bash |
| 24 | + setup-commands: |
| 25 | + - /venv/bin/python manage.py migrate migrate |
| 26 | + - /venv/bin/python manage.py load_initial_data |
| 27 | + - wget --recursive --spider --no-directories http://app:8000/ -o warmup.log || true |
| 28 | + # wget issues an error code 8 due to some images returning 404. We could catch the code 8 specifically, but |
| 29 | + # it would not tell us if these are the known images or some other problems with the sever occured. |
| 30 | + # Sadly this call is very flaky and might still show up as successful even if cache warmup did not really work :( |
| 31 | + # PRs welcome! |
| 32 | + |
| 33 | + green-coding-puppeteer-container: |
| 34 | + image: greencoding/puppeteer-chrome |
| 35 | + setup-commands: |
| 36 | + - cp /tmp/repo/benchmark/puppeteer/admin.js /var/www/admin.js |
| 37 | + - cp /tmp/repo/benchmark/puppeteer/blog-filtering.js /var/www/blog-filtering.js |
| 38 | + - cp /tmp/repo/benchmark/puppeteer/contact-us.js /var/www/contact-us.js |
| 39 | + - cp /tmp/repo/benchmark/puppeteer/homepage-landing.js /var/www/homepage-landing.js |
| 40 | + - cp /tmp/repo/benchmark/puppeteer/search.js /var/www/search.js |
| 41 | + - cp /tmp/repo/benchmark/puppeteer/package.json /var/www/package.json |
| 42 | + |
| 43 | +flow: |
| 44 | + - name: Blog filtering |
| 45 | + container: green-coding-puppeteer-container |
| 46 | + commands: |
| 47 | + - type: console |
| 48 | + command: USAGE_SCENARIO_DOMAIN=http://app:8000 node /var/www/blog-filtering.js |
| 49 | + shell: sh |
| 50 | + log-stdout: True |
| 51 | + read-sci-stdout: True |
| 52 | + read-notes-stdout: True |
| 53 | + |
| 54 | + - name: Contact Us |
| 55 | + container: green-coding-puppeteer-container |
| 56 | + commands: |
| 57 | + - type: console |
| 58 | + command: USAGE_SCENARIO_DOMAIN=http://app:8000 node /var/www/contact-us.js |
| 59 | + shell: sh |
| 60 | + log-stdout: True |
| 61 | + read-sci-stdout: True |
| 62 | + read-notes-stdout: True |
| 63 | + |
| 64 | + - name: Homepage Landing |
| 65 | + container: green-coding-puppeteer-container |
| 66 | + commands: |
| 67 | + - type: console |
| 68 | + command: USAGE_SCENARIO_DOMAIN=http://app:8000 node /var/www/homepage-landing.js |
| 69 | + shell: sh |
| 70 | + log-stdout: True |
| 71 | + read-sci-stdout: True |
| 72 | + read-notes-stdout: True |
| 73 | + |
| 74 | + - name: Search |
| 75 | + container: green-coding-puppeteer-container |
| 76 | + commands: |
| 77 | + - type: console |
| 78 | + command: USAGE_SCENARIO_DOMAIN=http://app:8000 node /var/www/search.js |
| 79 | + shell: sh |
| 80 | + log-stdout: True |
| 81 | + read-sci-stdout: True |
| 82 | + read-notes-stdout: True |
| 83 | + |
| 84 | + - name: Admin Flow |
| 85 | + container: green-coding-puppeteer-container |
| 86 | + commands: |
| 87 | + - type: console |
| 88 | + command: USAGE_SCENARIO_DOMAIN=http://app:8000 node /var/www/admin.js |
| 89 | + shell: sh |
| 90 | + log-stdout: True |
| 91 | + read-sci-stdout: True |
| 92 | + read-notes-stdout: True |
0 commit comments