Skip to content

Commit fd94a32

Browse files
committed
Removing a bunch of old stuff
1 parent 25f9aa8 commit fd94a32

37 files changed

+36
-1809
lines changed

.docker/pizzly-server.env.example

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/webapp/Dockerfile

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,67 @@
1-
FROM node:16-bullseye AS pruner
2-
RUN apt-get update && apt-get install openssl -y
1+
FROM node:18-bullseye-slim AS pruner
2+
RUN apt-get update && apt-get install -y openssl
33
WORKDIR /app
4-
RUN npm install turbo@1.7.0 -g
4+
RUN yarn global add turbo
55
COPY . .
66
RUN turbo prune --scope=webapp --docker
77
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
88

99
# Base strategy to have layer caching
10-
FROM node:16-bullseye AS base
11-
RUN apt-get update && apt-get install openssl ca-certificates g++ make wget python3 -y
12-
ENV PULSAR_CPP_CLIENT_VERSION=2.10.3
13-
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client.deb -q
14-
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client-dev.deb -q
15-
RUN dpkg -i ./apache-pulsar-client*.deb
10+
FROM node:18-bullseye-slim AS base
11+
RUN apt-get update && apt-get install -y openssl
1612
WORKDIR /app
1713
COPY .gitignore .gitignore
1814
COPY --from=pruner /app/out/json/ .
1915
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
2016
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
2117

18+
FROM base AS dev-deps
19+
WORKDIR /app
20+
RUN corepack enable
21+
RUN pnpm install --ignore-scripts --no-frozen-lockfile
22+
2223
FROM base AS production-deps
2324
WORKDIR /app
24-
RUN npm install turbo@1.7.0 -g
2525
RUN corepack enable
2626
ENV NODE_ENV production
27-
RUN npm config set python /usr/bin/python3
28-
COPY --from=pruner /app/out/full/apps/webapp/prisma/schema.prisma /app/apps/webapp/prisma/schema.prisma
29-
RUN pnpm install --prod --frozen-lockfile
30-
RUN pnpx prisma generate --schema /app/apps/webapp/prisma/schema.prisma
27+
RUN pnpm install --prod --no-frozen-lockfile
28+
COPY --from=pruner /app/out/full/packages/database/prisma/schema.prisma /app/packages/database/prisma/schema.prisma
29+
RUN pnpx prisma generate --schema /app/packages/database/prisma/schema.prisma
3130

3231
FROM base AS builder
3332
WORKDIR /app
34-
RUN npm install turbo@1.7.0 -g
35-
COPY turbo.json turbo.json
3633
RUN corepack enable
34+
# ENV NODE_ENV production
3735
COPY --from=pruner /app/out/full/ .
38-
RUN npm config set python /usr/bin/python3
39-
ENV NODE_ENV development
40-
RUN pnpm install --ignore-scripts --frozen-lockfile
41-
ENV NODE_ENV production
36+
COPY --from=dev-deps /app/ .
37+
COPY turbo.json turbo.json
4238
RUN pnpm run generate
4339
RUN pnpm run build --filter=webapp...
44-
RUN pnpx prisma migrate deploy --schema apps/webapp/prisma/schema.prisma
45-
RUN pnpm run db:seed --filter=webapp
4640

4741
# Runner
48-
FROM node:16-bullseye AS runner
49-
RUN apt-get update && apt-get install openssl ca-certificates g++ make wget python3 -y
50-
ENV PULSAR_CPP_CLIENT_VERSION=2.10.3
51-
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client.deb -q
52-
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client-dev.deb -q
53-
RUN dpkg -i ./apache-pulsar-client*.deb
54-
RUN npm install turbo -g
42+
FROM node:18-bullseye-slim AS runner
43+
RUN apt-get update && apt-get install -y openssl
5544
WORKDIR /app
5645
RUN corepack enable
5746
ENV NODE_ENV production
58-
RUN addgroup --system --gid 1001 nodejs
59-
RUN adduser --system --uid 1001 remixjs
60-
RUN chown -R remixjs:nodejs /app
61-
USER remixjs
47+
# RUN addgroup --system --gid 1001 nodejs
48+
# RUN adduser --system --uid 1001 remixjs
49+
# RUN chown -R remixjs:nodejs /app
50+
# USER remixjs
51+
52+
# COPY --from=pruner --chown=remixjs:nodejs /app/out/full/ .
53+
# COPY --from=production-deps --chown=remixjs:nodejs /app .
54+
# COPY --from=builder --chown=remixjs:nodejs /app/apps/remix-app/app/styles/tailwind.css ./apps/remix-app/app/styles/tailwind.css
55+
# COPY --from=builder --chown=remixjs:nodejs /app/apps/remix-app/build/server.js ./apps/remix-app/build/server.js
56+
# COPY --from=builder --chown=remixjs:nodejs /app/apps/remix-app/build ./apps/remix-app/build
57+
# COPY --from=builder --chown=remixjs:nodejs /app/apps/remix-app/public ./apps/remix-app/public
58+
59+
COPY --from=pruner /app/out/full/ .
60+
COPY --from=production-deps /app .
61+
COPY --from=builder /app/apps/remix-app/app/styles/tailwind.css ./apps/remix-app/app/styles/tailwind.css
62+
COPY --from=builder /app/apps/remix-app/build/server.js ./apps/remix-app/build/server.js
63+
COPY --from=builder /app/apps/remix-app/build ./apps/remix-app/build
64+
COPY --from=builder /app/apps/remix-app/public ./apps/remix-app/public
6265

63-
COPY --from=pruner --chown=remixjs:nodejs /app/out/full/ .
64-
COPY --from=production-deps --chown=remixjs:nodejs /app .
65-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/app/styles/tailwind.css ./apps/webapp/app/styles/tailwind.css
66-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/build/server.js ./apps/webapp/build/server.js
67-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/build ./apps/webapp/build
68-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/public ./apps/webapp/public
69-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/prisma/schema.prisma ./apps/webapp/build/schema.prisma
70-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/prisma/migrations ./apps/webapp/build/migrations
71-
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node ./apps/webapp/build/libquery_engine-debian-openssl-1.1.x.so.node
7266

73-
# release_command = "pnpx prisma migrate deploy --schema apps/webapp/prisma/schema.prisma"
7467
ENTRYPOINT ["pnpm", "--filter", "webapp", "run", "start"]

apps/webapp/cypress/.eslintrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/webapp/cypress/e2e/smoke.cy.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

apps/webapp/cypress/fixtures/test.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/webapp/cypress/support/commands.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

apps/webapp/cypress/support/e2e.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

apps/webapp/cypress/tsconfig.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/webapp/mocks/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/webapp/mocks/index.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)