-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile
54 lines (36 loc) · 985 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
43
44
45
46
47
48
49
50
51
52
53
54
FROM node:20
ARG PUBLIC_URL_ARG=
ENV PUBLIC_URL=$PUBLIC_URL_ARG
# Install GDAL with Python bindings
RUN apt-get -y update
RUN apt-get install -y gdal-bin libgdal-dev python3-pip python3-gdal
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY . .
#############################
# MMGIS
#############################
# Install app dependencies
COPY python-requirements.txt ./
RUN rm /usr/lib/python*/EXTERNALLY-MANAGED && \
pip3 install -r ./python-requirements.txt
# Use python3 for python
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN npm install
# build
RUN npm run build
#############################
# MMGIS Configure
#############################
WORKDIR /usr/src/app/configure
# Clean out configure build folder
RUN rm -rf /usr/src/app/configure/build/*
RUN npm install
# Build Configure Site
RUN npm run build
##
WORKDIR /usr/src/app/
#
EXPOSE 8888
CMD [ "npm", "run", "start:prod" ]