File tree Expand file tree Collapse file tree 4 files changed +25
-10
lines changed Expand file tree Collapse file tree 4 files changed +25
-10
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,8 @@ services:
1212
1313 frontend :
1414 container_name : frontend
15- image : openmina/frontend:0.8.3-producer-demo
16- # build:
17- # context: .
18- # dockerfile: Dockerfile_FE
19- # args:
20- # BUILD_CONFIGURATION: block_producers
15+ image : openmina/frontend:0.8.3
16+ environment :
17+ OPENMINA_FRONTEND_ENVIRONMENT : block_producers
2118 ports :
2219 - " 8070:80"
Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ services:
1111
1212 frontend :
1313 image : openmina/frontend:${OPENMINA_FRONTEND_TAG:-latest}
14+ environment :
15+ OPENMINA_FRONTEND_ENVIRONMENT : compose
1416 ports :
1517 - " 8070:80"
Original file line number Diff line number Diff line change 11FROM node:18 AS BUILD_IMAGE
22# Doesn't matter what we put here - it get's overwritten by the docker build command
3- ARG BUILD_CONFIGURATION=staging
3+ ARG BUILD_CONFIGURATION=production
44WORKDIR /app
55COPY . .
66RUN npm install
@@ -12,6 +12,10 @@ RUN echo "---------- USING APACHE ----------"
1212FROM httpd:2.4
1313COPY --from=BUILD_IMAGE /app/dist/frontend /usr/local/apache2/htdocs/
1414COPY --from=BUILD_IMAGE /app/httpd.conf /usr/local/apache2/conf/httpd.conf
15- # FROM nginx:alpine
16- # COPY --from=BUILD_IMAGE /app/dist/frontend /usr/share/nginx/html
17- # COPY --from=BUILD_IMAGE /app/nginx.conf /etc/nginx/nginx.conf
15+
16+ COPY docker/startup.sh /usr/local/bin/startup.sh
17+ RUN chmod +x /usr/local/bin/startup.sh
18+
19+ ENTRYPOINT ["/usr/local/bin/startup.sh" ]
20+
21+ CMD ["httpd-foreground" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -n " $OPENMINA_FRONTEND_ENVIRONMENT " ]; then
4+ echo " Using environment: $OPENMINA_FRONTEND_ENVIRONMENT "
5+ cp -f /usr/local/apache2/htdocs/assets/environments/" $OPENMINA_FRONTEND_ENVIRONMENT " .js \
6+ /usr/local/apache2/htdocs/assets/environments/env.js
7+ else
8+ echo " No environment specified. Using default."
9+ fi
10+
11+ echo " Starting Apache..."
12+ exec " $@ "
You can’t perform that action at this time.
0 commit comments