-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (24 loc) · 971 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
FROM node:17-bullseye AS builder
LABEL maintainer="bakedSpaceTime"
# TODO: copy package.json and package-lock.json to leverage Docker cache
COPY ./frontend/src/theme/ /frontend/src/theme/
COPY ./frontend/public/ /frontend/public/
COPY ./frontend/package-lock.json /frontend/package-lock.json
COPY ./frontend/package.json /frontend/package.json
WORKDIR /frontend
RUN npm install
RUN npm run prepare
COPY ./frontend/ /frontend/
RUN npm run build
FROM debian:bullseye
RUN apt-get update -y && apt-get install -y python3 python3-pip
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nginx
# Copy just the requirements.txt to leverage Docker cache
COPY ./backend/requirements.txt /backend/requirements.txt
WORKDIR /backend
RUN pip3 install -r requirements.txt
COPY ./backend /backend
COPY --from=builder /frontend/public /frontend
COPY ./docker-files/default /etc/nginx/sites-available/default
COPY ./docker-files/start.sh /start.sh
CMD [ "bash","/start.sh" ]