Skip to content

Commit

Permalink
Merge pull request #56 from UoaWDCC/fix/fly-deployment
Browse files Browse the repository at this point in the history
Fix/fly deployment
  • Loading branch information
GBHU753 authored Jul 17, 2024
2 parents d5ea094 + 78d2ce7 commit 78c7f59
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN apk add --no-cache docker-compose
# Install gh CLI
RUN apk add --no-cache github-cli

#Install curl
RUN apk add --no-cache curl

EXPOSE 3307

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.production.toml
working-directory: ./web
working-directory: ./frontend
env:
FLY_API_TOKEN: ${{ secrets.FLY_WEB_PRODUCTION_API_TOKEN }}

Expand All @@ -21,6 +21,6 @@ jobs:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.production.toml
working-directory: ./api
working-directory: ./backend
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_PRODUCTION_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config fly.staging.toml
working-directory: ./api
working-directory: ./backend
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_STAGING_API_TOKEN }}
4 changes: 4 additions & 0 deletions backend/fly.production.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app = 'wdcc-aspa-api'
primary_region = 'syd'

[build]
4 changes: 4 additions & 0 deletions backend/fly.staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app = 'wdcc-aspa-api-staging'
primary_region = 'syd'

[build]
40 changes: 12 additions & 28 deletions backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz"
integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==

"@types/node@*", "@types/node@^20.12.7":
"@types/node@^20.12.7":
version "20.12.7"
resolved "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz"
integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==
Expand Down Expand Up @@ -263,7 +263,7 @@ create-require@^1.1.0:

[email protected]:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
Expand All @@ -275,13 +275,6 @@ debug@^4:
dependencies:
ms "2.1.2"

[email protected]:
version "2.6.9"
resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"

define-data-property@^1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz"
Expand Down Expand Up @@ -364,7 +357,7 @@ express-openapi@^12.1.3:
openapi-framework "^12.1.3"
openapi-types "^12.1.3"

express@^4.19.2, "express@>=4.0.0 || >=5.0.0-beta":
express@^4.19.2:
version "4.19.2"
resolved "https://registry.npmjs.org/express/-/express-4.19.2.tgz"
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
Expand Down Expand Up @@ -446,6 +439,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
Expand Down Expand Up @@ -605,13 +603,6 @@ lodash.merge@^4.6.1:
resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==

lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"

make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
Expand Down Expand Up @@ -649,14 +640,7 @@ [email protected]:
resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==

minimatch@^3.1.1:
version "3.1.2"
resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

minimatch@^3.1.2:
minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
Expand Down Expand Up @@ -826,7 +810,7 @@ picomatch@^2.0.4, picomatch@^2.2.1:
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

prisma@*, prisma@^5.13.0:
prisma@^5.13.0:
version "5.13.0"
resolved "https://registry.npmjs.org/prisma/-/prisma-5.13.0.tgz"
integrity sha512-kGtcJaElNRAdAGsCNykFSZ7dBKpL14Cbs+VaQ8cECxQlRPDjBlMHNFYeYt0SKovAVy2Y65JXQwB3A5+zIQwnTg==
Expand Down Expand Up @@ -1041,7 +1025,7 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"

typescript@^5.4.5, typescript@>=2.7:
typescript@^5.4.5:
version "5.4.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
Expand All @@ -1056,7 +1040,7 @@ undici-types@~5.26.4:
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

unpipe@~1.0.0, [email protected]:
[email protected], unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
Expand Down
7 changes: 7 additions & 0 deletions frontend/Dockerfile.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
COPY --link . .

# Set build time environment variables
ENV NEXT_API_URL="https://wdcc-aspa-api.fly.dev"

# Build application
RUN yarn run build
7 changes: 7 additions & 0 deletions frontend/Dockerfile.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
COPY --link . .

# Set build time environment variables
ENV NEXT_API_URL="https://wdcc-aspa-api-staging.fly.dev"

# Build application
RUN yarn run build
4 changes: 4 additions & 0 deletions frontend/fly.production.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app = 'wdcc-aspa'
primary_region = 'syd'

[build]
4 changes: 4 additions & 0 deletions frontend/fly.staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
app = 'wdcc-aspa-staging'
primary_region = 'syd'

[build]

0 comments on commit 78c7f59

Please sign in to comment.