Skip to content
Snippets Groups Projects
Dockerfile 1.54 KiB
FROM node:12.9.0-alpine as builder
ARG BASE_HREF
RUN mkdir -p /app
WORKDIR /app
COPY package.json /app

RUN apk add --update python make g++\
   && rm -rf /var/cache/apk/*


RUN npm install
COPY . /app
RUN npm run build -- --prod --aot --base-href $BASE_HREF

FROM nginx
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY adapt-config-json.sh /adapt-config-json.sh
RUN chmod 775 /*.sh

EXPOSE 80
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html

RUN rm /usr/share/nginx/html/assets/config.json

ENV DASHBOARD_BASE_URL=http://localhost:4200 \
    IDM_BASE_URL=http://localhost:8081 \
	TRAFFIC_PREDICTION_API_BASE_URL=http://localhost:8000/urbanite_traffic \
	BIKE_ANALYSIS_API_BASE_URL=http://localhost:8000/bikeAnalysis \
	GLTRAFFIC_API_BASE_URL=http://localhost:8000/urbanite_traffic \
	IDRA_BASE_URL=http://localhost:8080 \
	DATALET_BASE_URL=http://localhost/deep/deep-components/creator.html \
	TRAFFICSIMSERVER_API_BASE_URL=http://localhost:8081 \
	DASHBOARD_CTRL_API_BASE_URL=http://localhost:8085 \
	BUS_OD_API_BASE_URL=http://localhost:8000/busesod \
	BIKETRAJECTORY_API_BASE_URL=http://localhost:8000/urbanite_biketrajectories \
	NOISECOMPUTATION_API_BASE_URL=http://localhost:8002/urbanite_noise_computation \
	ODFROMCOUNTS_API_BASE_URL=http://localhost:8015/odfromcounts \
	TRAFFIC_SIMULATION_BASE_URL=http://localhost:8082/traffic-simulation \
	TRAFFIC_SIMULATION_STORAGE_URL=http://localhost:8081 \
	TRAFFIC_SIMULATION_DSS_URL=http://localhost:8083 \
	TRAFFIC_SIMULATION_STOMP_URL=ws://localhost:/gs-guide-websocket