-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
70 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM node:20.18.0-alpine AS base | ||
|
||
RUN npm install -g [email protected] | ||
RUN npm install -g [email protected] | ||
|
||
FROM base AS builder | ||
|
||
RUN apk update | ||
RUN apk add --no-cache libc6-compat | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN turbo prune @echo-webkom/web --docker | ||
|
||
FROM base AS installer | ||
RUN apk update | ||
RUN apk add --no-cache libc6-compat | ||
WORKDIR /app | ||
|
||
COPY --from=builder /app/out/json/ . | ||
RUN pnpm install | ||
|
||
COPY --from=builder /app/out/full/ . | ||
|
||
RUN pnpm turbo build --filter=@echo-webkom/web... | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
USER nextjs | ||
|
||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ | ||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static | ||
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public | ||
|
||
CMD node apps/web/server.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
app = "fly-echo-web" | ||
primary_region = "arn" | ||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
|
||
[[services]] | ||
internal_port = 3000 | ||
processes = [ "app" ] | ||
protocol = "tcp" | ||
auto_stop_machines = "stop" | ||
auto_start_machines = true | ||
min_machines_running = 1 | ||
script_checks = [ ] | ||
|
||
# [services.concurrency] | ||
# hard_limit = 120 | ||
# soft_limit = 100 | ||
# type = "requests" | ||
|
||
[[services.ports]] | ||
handlers = [ "http" ] | ||
port = 80 | ||
force_https = true | ||
|
||
[[services.ports]] | ||
handlers = [ "tls", "http" ] | ||
port = 443 | ||
|
||
[[vm]] | ||
size = "shared-cpu-4x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.