-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1135 from willcohen/podman
* Add podman support alongside docker for dev * Consolidate client build steps into a single Dockerfile, which may help with heroku deploy
- Loading branch information
Showing
10 changed files
with
95 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,90 @@ | ||
ARG TAG=dev | ||
|
||
FROM compdem/polis-client-admin:${TAG} as admin | ||
FROM compdem/polis-client-participation:${TAG} as participation | ||
FROM compdem/polis-client-report:${TAG} as report | ||
# polis-client-admin | ||
# Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
FROM node:16.9.0-alpine | ||
WORKDIR /client-admin/app | ||
|
||
WORKDIR /app | ||
RUN apk add git --no-cache | ||
|
||
COPY package*.json ./ | ||
COPY client-admin/package*.json ./ | ||
RUN npm install | ||
|
||
COPY client-admin/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-admin/. . | ||
|
||
ARG GIT_HASH | ||
RUN npm run deploy:prod | ||
|
||
# polis-client-participation | ||
# # Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
WORKDIR ../../client-participation/app | ||
|
||
RUN apk add --no-cache --virtual .build \ | ||
g++ git make python | ||
|
||
# Allow global npm installs in Docker | ||
RUN npm config set unsafe-perm true | ||
|
||
# Upgrade npm v6.7.0 -> v6.9.2 to alias multiple pkg versions. | ||
# See: https://stackoverflow.com/a/56134858/504018 | ||
RUN npm install -g [email protected] | ||
|
||
COPY client-participation/package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
RUN apk del .build | ||
|
||
COPY client-participation/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-participation/. . | ||
|
||
ARG GIT_HASH | ||
ARG BABEL_ENV=production | ||
|
||
RUN npm run deploy:prod | ||
|
||
|
||
# polis-client-report | ||
# Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
WORKDIR ../../client-report/app | ||
|
||
RUN apk add git --no-cache | ||
|
||
COPY client-report/package*.json ./ | ||
RUN npm ci | ||
|
||
COPY client-report/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-report/. . | ||
|
||
ARG GIT_HASH | ||
RUN npm run deploy:prod | ||
|
||
|
||
FROM docker.io/node:16.9.0-alpine | ||
|
||
WORKDIR ../../file-server/app | ||
|
||
COPY file-server/package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY . . | ||
COPY fs_config.template.json fs_config.json | ||
COPY file-server/. . | ||
COPY file-server/fs_config.template.json fs_config.json | ||
|
||
RUN mkdir /app | ||
RUN mkdir /app/build | ||
COPY --from=admin /app/build/ /app/build | ||
COPY --from=participation /app/build/ /app/build | ||
COPY --from=report /app/build/ /app/build | ||
COPY --from=0 /client-admin/app/build/ /app/build | ||
COPY --from=1 /client-participation/app/build/ /app/build | ||
COPY --from=2 /client-report/app/build/ /app/build | ||
|
||
EXPOSE 8080 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM clojure:tools-deps | ||
FROM docker.io/clojure:tools-deps | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:14.14.0-alpine | ||
FROM docker.io/node:14.14.0-alpine | ||
|
||
WORKDIR /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters