-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (24 loc) · 993 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:20-alpine AS node-builder
WORKDIR /app
COPY Frontend/package.json Frontend/package-lock.json ./
RUN npm install
COPY Frontend .
RUN npm run build
FROM python:3.11-alpine AS python-builder
WORKDIR /app
RUN apk add --no-cache --update alpine-sdk
RUN apk add --no-cache gcc python3-dev musl-dev libffi-dev libc-dev
COPY Tools/mssql-proxy/odbc-driver-installer.sh Tools/mssql-proxy/requirements.txt ./
RUN ./odbc-driver-installer.sh
RUN pip install --no-cache-dir -r requirements.txt pyinstaller
COPY Tools/mssql-proxy .
RUN pyinstaller mssql-proxy.linux.spec
FROM alpine:latest
RUN apk add --no-cache nginx
COPY --from=node-builder /app/dist/code-chef /usr/share/nginx/code-chef
COPY --from=python-builder /app/dist/mssql-proxy /usr/local/bin/mssql-proxy
COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /run/nginx /var/log/api
ENV ALLOWED_ORIGIN="http://localhost:4200"
EXPOSE 4200 50505
CMD ["sh", "-c", "nginx && /usr/local/bin/mssql-proxy -o ${ALLOWED_ORIGIN}"]