-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: dockerfile * build(deps): update package.json and yarn.lock * fly configuration * build(deps): update yarn.lock * build: update .dockerignore * build: update Dockerfile
- Loading branch information
1 parent
25ad6fd
commit 6a1036d
Showing
6 changed files
with
295 additions
and
8 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
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,57 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
# Adjust NODE_VERSION as desired | ||
ARG NODE_VERSION=18.17.1 | ||
FROM node:${NODE_VERSION}-slim as base | ||
|
||
|
||
# Next.js app lives here | ||
WORKDIR /app | ||
|
||
# Set production environment | ||
ENV NEXT_SHARP_PATH=/app/node_modules/sharp | ||
|
||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base as build | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install -y build-essential pkg-config python-is-python3 | ||
|
||
# Install Yarn | ||
RUN npm install -g yarn --force | ||
|
||
# Install node modules | ||
COPY --link package.json ./ | ||
COPY --link yarn.lock ./ | ||
COPY --link apps/web/package.json ./apps/web/package.json | ||
|
||
RUN cd apps/web && \ | ||
yarn install --ignore-scripts | ||
|
||
# Copy application code | ||
COPY --link . . | ||
|
||
ENV NODE_ENV="production" | ||
|
||
# Build application | ||
RUN yarn run build:web | ||
|
||
# Remove development dependencies | ||
RUN cd apps/web && \ | ||
yarn install --prod --ignore-scripts | ||
|
||
|
||
# Final stage for app image | ||
FROM base | ||
|
||
ENV NODE_ENV="production" | ||
|
||
# Copy built application | ||
COPY --from=build /app /app | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 3000 | ||
|
||
CMD [ "npm", "run", "start:web" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# fly.toml app configuration file generated for ever-teams on 2023-10-26T08:19:45Z | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "ever-teams" | ||
primary_region = "lax" | ||
kill_signal = "SIGINT" | ||
kill_timeout = "5m0s" | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] |
Oops, something went wrong.