Skip to content

Commit

Permalink
consolidate build into apache dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyanthropos committed Mar 27, 2023
1 parent 2c6de3d commit 93251fc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/docker-compose.extend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ services:
- vendor:/usr/local/apache2/htdocs/api/vendor
restart: on-failure
apache:
ports:
- 8080:80
build:
context: ./
dockerfile: ./doenet_docker/apache/Dockerfile
volumes:
- ./dist_local:/usr/local/apache2/htdocs/
- ./src/Media:/usr/local/apache2/htdocs/media
- ./doenet_docker/apache/apache.conf:/usr/local/apache2/conf/httpd.conf
mysql:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ version: '3.9'
services:
apache:
image: lyanthropos/doenet_apache:dev
ports:
- 8080:80
networks:
- dev_net
depends_on:
Expand Down
13 changes: 12 additions & 1 deletion doenet_docker/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM node:19.8-bullseye AS build
WORKDIR /build
COPY src ./src
COPY public ./public
COPY index.html package*.json vite.config.js ./
RUN echo "$(ls)"
RUN npm ci
RUN npx vite build --outDir site

FROM httpd:2.4.41-alpine
RUN apk update; \
apk upgrade;
COPY ./doenet_docker/apache/apache.conf /usr/local/apache2/conf/httpd.conf
WORKDIR /usr/local/apache2
COPY --from=build /build/site ./htdocs
COPY ./doenet_docker/apache/apache.conf ./conf/httpd.conf
EXPOSE 80
EXPOSE 443
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src="https://www.youtube.com/iframe_api"></script>
<script
type="module"
src="./src/media/geogebra/scripts/deployggb.js"
src="./src/Media/geogebra/scripts/deployggb.js"
></script>
<!-- <link rel="stylesheet" type="text/css" href="/src/css/handsontable.full.css" /> -->

Expand Down

0 comments on commit 93251fc

Please sign in to comment.