forked from hackforla/shared-housing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (29 loc) · 949 Bytes
/
Copy pathDockerfile
File metadata and controls
46 lines (29 loc) · 949 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:alpine as clientBuilder
COPY ./client /app
WORKDIR /app
RUN apk update && apk add bash
RUN npm install
RUN npm run build:local
FROM alpine:latest
RUN apk update
RUN apk add --no-cache ca-certificates
RUN apk add -u python3
# https://github.com/frol/docker-alpine-python3/blob/master/Dockerfile
RUN python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel
RUN apk add -u python3-dev py3-gunicorn postgresql-dev build-base
WORKDIR /app
COPY --from=clientBuilder /app/dist ./static
COPY --from=clientBuilder /app/dist/index.html ./templates/index.html
COPY ./server .
RUN pip3 install -r requirements.txt
# COPY server/templates /app/templates
# COPY server/static /app/static
RUN chmod 777 /app/startup.sh
ENV MONGO_USERNAME h4la
ENV MONGO_PASSWORD metro
ENV MONGO_DATABASE sharedhousing
ENV PYTHONUNBUFFERED 1
EXPOSE 80
ENTRYPOINT ["/app/startup.sh"]