-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: clean up and move connector to /api/
- Loading branch information
Thibault Ballier
committed
Oct 5, 2023
1 parent
e23394d
commit ba46c39
Showing
12 changed files
with
150 additions
and
356 deletions.
There are no files selected for viewing
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,7 +1,27 @@ | ||
FROM node:20-slim as build-web-app | ||
|
||
WORKDIR /app | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
RUN wget -qO- https://get.pnpm.io/install.sh | sh - | ||
COPY . . | ||
RUN cd web-app && pnpm install && pnpm build | ||
|
||
RUN mv ./web-app/build ./temp-build \ | ||
&& rm -rf ./web-app \ | ||
&& mkdir -p ./web-app \ | ||
&& mv ./temp-build ./web-app/build | ||
|
||
|
||
FROM python:3.11.4-slim-bullseye | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN rm -rf web-app | ||
COPY --from=build-web-app /app/web-app/build /app/web-app/ | ||
RUN pip install -r requirements.txt | ||
|
||
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--access-logfile", "/logs/access.log", "--error-logfile", "/logs/error.log", "app:app"] |
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: "3" | ||
services: | ||
sporteasy-calendar-connector: | ||
image: sporteasy-calendar-connector | ||
build: | ||
context: ./ | ||
ports: | ||
- "5000:5000" | ||
volumes: | ||
- ./sporteasy-calendar-connector-logs:/logs | ||
restart: unless-stopped |
Oops, something went wrong.