-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfullstack.Dockerfile
More file actions
45 lines (34 loc) · 975 Bytes
/
fullstack.Dockerfile
File metadata and controls
45 lines (34 loc) · 975 Bytes
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
43
44
45
# FROM node:lts-alpine3.15 as develop-stage
FROM node:18-alpine as develop-stage
WORKDIR /app
COPY ./spa/package*.json ./
RUN yarn global add @quasar/cli
COPY ./spa .
# build stage
FROM develop-stage as build-stage
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN yarn
RUN quasar build
# production stage
FROM python:3.9
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql \
postgresql-client \
nginx \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY ./requirements.txt ./
RUN pip install -r requirements.txt
COPY --from=build-stage /app/dist/spa /var/www/html/
RUN rm /etc/nginx/sites-enabled/default
COPY ./deployment/fullstack/nginx.conf /etc/nginx/sites-enabled/
COPY ./deployment/fullstack/startup.sh /tmp
RUN chmod 555 /tmp/startup.sh
# RUN mkdir -p /data/media /data/static
# RUN service nginx restart
COPY . .
RUN ln -s /data/media media
# RUN ln -s /data/static static
EXPOSE 80
ENTRYPOINT [ "/tmp/startup.sh" ]