The deployment was good,
my fly.toml
# fly.toml file generated for avo-fly on 2023-02-07T20:59:50-06:00
app = "avo-fly"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[deploy]
release_command = "npx prisma migrate deploy"
[env]
PORT = "8080"
[experimental]
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
package.json
{
"private": true,
"sideEffects": false,
"scripts": {
"build": "npm run build:css && remix build",
"build:css": "tailwindcss -m -i ./styles/app.css -o app/styles/app.css",
"deploy": "fly deploy --remote-only",
"dev": "remix dev",
"dev:css": "tailwindcss -w -i ./styles/app.css -o app/styles/app.css",
"start": "remix-serve build",
"setup": "prisma generate && prisma migrate deploy && prisma db seed",
"typecheck": "tsc"
},
"prisma": {
"seed": "node --require esbuild-register prisma/seed.ts"
},
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@heroicons/react": "^1.0.6",
"@mui/material": "^5.11.8",
"@prisma/client": "^4.9.0",
"@remix-run/node": "^1.12.0",
"@remix-run/react": "^1.12.0",
"@remix-run/serve": "^1.12.0",
"@tailwindcss/forms": "^0.5.3",
"framer-motion": "^9.0.2",
"i": "^0.3.7",
"isbot": "^3.6.5",
"npm": "^9.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"spin-delay": "^1.2.0",
"uuidv4": "^6.2.13",
"v4": "^0.0.1"
},
"devDependencies": {
"@remix-run/dev": "^1.12.0",
"@remix-run/eslint-config": "^1.12.0",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"concurrently": "^7.6.0",
"esbuild-register": "^3.4.2",
"eslint": "^8.27.0",
"prisma": "^4.9.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.8.4"
},
"engines": {
"node": ">=14"
}
}
Dockerfile
# base node image
FROM node:16-bullseye-slim as base
# Install openssl for Prisma
RUN apt-get update && apt-get install -y openssl
# Install all node_modules, including dev dependencies
FROM base as deps
RUN mkdir /app
WORKDIR /app
ADD package.json package-lock.json ./
RUN npm install --production=false
# Setup production node_modules
FROM base as production-deps
RUN mkdir /app
WORKDIR /app
COPY --from=deps /app/node_modules /app/node_modules
ADD package.json package-lock.json ./
RUN npm prune --production
# Build the app
FROM base as build
ENV NODE_ENV=production
RUN mkdir /app
WORKDIR /app
COPY --from=deps /app/node_modules /app/node_modules
# If we're using Prisma, uncomment to cache the prisma schema
ADD prisma .
RUN npx prisma generate
ADD . .
RUN npm run build
# Finally, build the production image with minimal footprint
FROM base
ENV NODE_ENV=production
RUN mkdir /app
WORKDIR /app
COPY --from=production-deps /app/node_modules /app/node_modules
# Uncomment if using Prisma
COPY --from=build /app/node_modules/.prisma /app/node_modules/.prisma
COPY --from=build /app/build /app/build
COPY --from=build /app/public /app/public
ADD . .
CMD ["npm", "run", "start"]
I dont know why I cant apply the seed inside fly.