Skip to content

Commit ce938de

Browse files
committed
deploy from subdirectories
1 parent 8115469 commit ce938de

File tree

8 files changed

+16
-60
lines changed

8 files changed

+16
-60
lines changed

Dockerfile

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

Procfile

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

backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11-slim
1+
FROM python:3.13-slim-bookworm
22

33
WORKDIR /app
44

@@ -33,4 +33,4 @@ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
3333
CMD curl -f http://localhost:${API_PORT}/health || exit 1
3434

3535
# Run the application
36-
CMD ["sh", "-c", "python -m uvicorn app.main:app --host ${API_HOST} --port ${API_PORT}"]
36+
CMD ["sh", "-c", "python -m uvicorn app.main:app --host ${API_HOST} --port ${API_PORT}"]

backend/Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: python -m uvicorn app.main:app --uds /var/run/cabotage/cabotage.sock
2+
release: echo 'doin deploy things'

frontend/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
FROM node:18-alpine AS base
1+
FROM node:18-bookworm AS base
22

33
# Install dependencies only when needed
44
FROM base AS deps
5-
RUN apk add --no-cache libc6-compat wget
65
WORKDIR /app
76

87
# Copy package files
@@ -23,12 +22,16 @@ ENV NEXT_PUBLIC_API_BASE=$NEXT_PUBLIC_API_BASE
2322
RUN npm run build
2423

2524
# Production image, copy all the files and run next
26-
FROM base AS runner
25+
FROM python:3.13-slim-bookworm AS runner
2726
WORKDIR /app
2827

2928
ENV NODE_ENV=production
3029

31-
RUN apk add --no-cache wget
30+
RUN apt-get update && apt-get install -y \
31+
wget \
32+
socat \
33+
nodejs \
34+
&& rm -rf /var/lib/apt/lists/*
3235

3336
RUN addgroup --system --gid 1001 nodejs
3437
RUN adduser --system --uid 1001 nextjs
@@ -44,6 +47,8 @@ RUN chown nextjs:nodejs .next
4447
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
4548
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
4649

50+
COPY ./scripts ./scripts
51+
4752
USER nextjs
4853

4954
EXPOSE 3000
@@ -55,4 +60,4 @@ ENV HOSTNAME="0.0.0.0"
5560
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
5661
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
5762

58-
CMD ["node", "server.js"]
63+
CMD ["node", "server.js"]

frontend/Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
web: ./scripts/start-frontend
2+
release: echo 'doin deploy things'
File renamed without changes.

0 commit comments

Comments
 (0)