File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,12 +10,25 @@ RUN pnpm build
1010FROM node:22-slim
1111WORKDIR /app
1212ENV PORT=3000
13- ENV HOST=0.0.0.0
13+ # TODO: see if AWS needs the HOST env
14+ # ENV HOST=0.0.0.0
15+ ENV HOSTNAME=0.0.0.0
1416EXPOSE 3000
1517
18+ RUN apt-get update -y && apt-get install -y --no-install-recommends openssl ca-certificates \
19+ && rm -rf /var/lib/apt/lists/*;
20+
21+ RUN npm install -g prisma@^6.15.0
22+
1623COPY --from=builder /app/.next/standalone ./
1724COPY --from=builder /app/.next/static ./.next/static
1825# TODO: uncomment once we add images to /public
1926# COPY --from=builder /app/public ./public
2027
28+ COPY --from=builder /app/prisma ./prisma
29+
30+ COPY docker-entrypoint.sh /entrypoint.sh
31+ RUN chmod +x /entrypoint.sh
32+ ENTRYPOINT ["/entrypoint.sh" ]
33+
2134CMD ["node" , "server.js" ]
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ # docker-entrypoint.sh
3+ # This script is ran on every deploy within our production docker container
4+ set -eu
5+ echo " Running Prisma migrations..."
6+ prisma migrate deploy
7+ echo " Starting app..."
8+ exec " $@ "
Original file line number Diff line number Diff line change 11#! /bin/bash
2-
2+ # start.sh
3+ # This script is for developers to use during local development
34cleanup () {
45 docker compose down
56 exit 0
You can’t perform that action at this time.
0 commit comments