Compare commits
5 Commits
9d0017a1b6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6eaf1d6b9f | |||
| ce19237fd2 | |||
| 06d75f9d29 | |||
| dc195aecc3 | |||
| a591fe4157 |
@@ -40,12 +40,12 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
'gitea.home.joemonk.co.uk/${{ gitea.repository }}:latest'
|
gitea.home.joemonk.co.uk/${{ gitea.repository }}:latest
|
||||||
'gitea.home.joemonk.co.uk/${{ gitea.repository }}:${{ gitea.sha }}'
|
gitea.home.joemonk.co.uk/${{ gitea.repository }}:${{ gitea.sha }}
|
||||||
'registry.fly.io/${{ gitea.repository }}:${{ gitea.sha }}'
|
registry.fly.io/joemonk:${{ gitea.sha }}
|
||||||
|
|
||||||
- uses: superfly/flyctl-actions/setup-flyctl@master
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
||||||
|
|
||||||
- run: flyctl deploy --remote-only -i registry.fly.io/${{ gitea.repository }}:${{ gitea.sha }}
|
- run: flyctl deploy --remote-only -i registry.fly.io/joemonk:${{ gitea.sha }}
|
||||||
env:
|
env:
|
||||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
10
Dockerfile
10
Dockerfile
@@ -15,7 +15,7 @@ WORKDIR /app
|
|||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ RUN npm run build
|
|||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
@@ -39,13 +39,13 @@ RUN chown nextjs:nodejs .next
|
|||||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||||
COPY --from=builder /app/db.sql ./db.sql
|
COPY --from=builder --chown=nextjs:nodejs /app/db.sql ./db.sql
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV PORT 3000
|
ENV PORT=3000
|
||||||
|
|
||||||
# server.js is created by next build from the standalone output
|
# server.js is created by next build from the standalone output
|
||||||
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
||||||
|
|||||||
8
fly.toml
8
fly.toml
@@ -6,17 +6,15 @@
|
|||||||
app = 'joemonk'
|
app = 'joemonk'
|
||||||
primary_region = 'lhr'
|
primary_region = 'lhr'
|
||||||
|
|
||||||
[build]
|
|
||||||
|
|
||||||
[http_service]
|
[http_service]
|
||||||
internal_port = 3000
|
internal_port = 3000
|
||||||
force_https = true
|
force_https = true
|
||||||
auto_stop_machines = 'stop'
|
auto_stop_machines = 'stop'
|
||||||
auto_start_machines = true
|
auto_start_machines = true
|
||||||
min_machines_running = 0
|
min_machines_running = 1
|
||||||
processes = ['app']
|
processes = ["app"]
|
||||||
[[http_service.checks]]
|
[[http_service.checks]]
|
||||||
grace_period = "15s"
|
grace_period = "30s"
|
||||||
interval = "120s"
|
interval = "120s"
|
||||||
method = "GET"
|
method = "GET"
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
|
|||||||
822
package-lock.json
generated
822
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user