Skip to content

Commit

Permalink
Fix Companion deploys (#3388)
Browse files Browse the repository at this point in the history
* Change compilation to postinstall

* Deploy

* Restore shape

* Reduce builds

* Use docker instead

* Use port as second variable

* Change

* Minor fixes

* Update .github/workflows/companion-deploy.yml

Co-authored-by: Mikael Finstad <finstaden@gmail.com>

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
  • Loading branch information
kiloreux and mifi authored Jan 10, 2022
1 parent 683c03c commit fee5ad9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/companion-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Companion Deploy


on:
push:
branches: [main]
Expand Down Expand Up @@ -43,10 +44,13 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Alter dockerfile
run: |
sed -i 's/^EXPOSE 3020$/EXPOSE $PORT/g' Dockerfile
- name: Deploy to heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
appdir: packages/@uppy/companion
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: companion-demo
heroku_email: ${{secrets.HEROKU_EMAIL}}
usedocker: true
1 change: 0 additions & 1 deletion packages/@uppy/companion/Procfile

This file was deleted.

3 changes: 3 additions & 0 deletions packages/@uppy/companion/heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
docker:
web: Dockerfile
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/standalone/start-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const companion = require('../companion')
const { version } = require('../../package.json')
const standalone = require('.')

const port = process.env.COMPANION_PORT || 3020
const port = process.env.COMPANION_PORT || process.env.PORT || 3020

const { app } = standalone()

Expand Down

0 comments on commit fee5ad9

Please sign in to comment.