-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
16 additions
and
63 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,32 +1,21 @@ | ||
ARG PLATFORM="linux/amd64" | ||
|
||
# Development stage | ||
FROM python:3.11-alpine AS development | ||
FROM --platform=${BUILDPLATFORM} python:3.11 AS development | ||
WORKDIR /workspace/backend | ||
|
||
RUN apk add --no-cache postgresql-client git openjdk17 nodejs | ||
|
||
RUN pip install poetry | ||
COPY ./pyproject.toml ./poetry.lock ./ | ||
RUN pip install poetry | ||
|
||
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes | ||
RUN poetry install | ||
RUN poetry install && poetry export -f requirements.txt --output requirements.txt --without-hashes | ||
|
||
COPY . ./ | ||
|
||
CMD ["sh", "./start.sh", "reload"] | ||
|
||
# Production stage | ||
FROM --platform=${PLATFORM} python:3.11-alpine AS production | ||
FROM --platform=${TARGETPLATFORM} python:3.11 AS production | ||
WORKDIR /workspace/backend | ||
|
||
RUN apk add --no-cache postgresql-client build-base | ||
|
||
COPY ./start.sh ./start.sh | ||
|
||
COPY --from=development /workspace/backend/requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir --upgrade -r /workspace/backend/requirements.txt | ||
COPY --from=development ./requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt | ||
|
||
COPY ./app /workspace/backend/app | ||
COPY ./app ./app | ||
|
||
CMD ["sh", "./start.sh"] | ||
CMD [ "python", "-m", "app.main" ] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,29 +1,20 @@ | ||
ARG PLATFORM="linux/amd64" | ||
|
||
# Development stage | ||
FROM node:20-alpine AS development | ||
FROM --platform=${BUILDPLATFORM} node:20 AS development | ||
WORKDIR /workspace/frontend | ||
|
||
RUN apk add --no-cache postgresql-client git openjdk17 nodejs | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm i | ||
RUN npm ci --ignore-scripts | ||
|
||
COPY . ./ | ||
RUN npm run build | ||
|
||
CMD ["npm", "run", "dev"] | ||
COPY . ./ | ||
|
||
# Production stage | ||
FROM --platform=${PLATFORM} node:20-alpine AS production | ||
FROM --platform=${TARGETPLATFORM} node:20 AS production | ||
WORKDIR /workspace/frontend | ||
|
||
RUN apk add --no-cache postgresql-client | ||
|
||
COPY package.json ./ | ||
COPY --from=development /workspace/frontend/node_modules ./node_modules | ||
RUN npm prune --production && npm i --ignore-scripts vite | ||
COPY --from=development /workspace/frontend . | ||
|
||
COPY . ./ | ||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
CMD ["npm", "run", "preview"] | ||
CMD [ "npm", "run", "preview" ] |