-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
13,877 additions
and
11,085 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish ad-hoc image to Docker Hub | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
push: | ||
paths: | ||
- '**build-and-publish-adhoc.yml' | ||
|
||
jobs: | ||
build-n-publish: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
IMAGE: sillsdev/web-languageforge:pr-1247-blue | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build and tag app | ||
run: docker build -t ${{ env.IMAGE }}-${GITHUB_SHA} -f docker/app/Dockerfile . | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
|
||
- name: Publish image | ||
run: | | ||
docker push ${{ env.IMAGE }}-${GITHUB_SHA} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build and publish an NPM cache image | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build-n-publish: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
IMAGE: sillsdev/web-languageforge:npm-cache | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build and tag cache image | ||
run: docker build -t ${{ env.IMAGE }} -f docker/npm-cache/Dockerfile . | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
|
||
- name: Publish image | ||
run: | | ||
docker push ${{ env.IMAGE }} |
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 |
---|---|---|
|
@@ -10,23 +10,23 @@ RUN npm config set unsafe-perm true && npm install -g [email protected] | |
RUN mkdir -p /data | ||
WORKDIR /data | ||
|
||
# unsafe-perm true is required to work around an npm bug since we are running as root, have a git+HTTPS repo source and it has a `prepare` script (perfect storm). | ||
# see https://github.com/npm/npm/issues/17346 | ||
COPY package.json package-lock.json ./ | ||
RUN npm config set unsafe-perm true && npm install --legacy-peer-deps | ||
# copy npm cache directory; as optimization for npm install | ||
COPY --from=sillsdev/web-languageforge:npm-cache /root/.npm /root/.npm | ||
|
||
# Copy in files needed for compilation, located in the repo root | ||
COPY typings ./typings/ | ||
COPY webpack.config.js webpack-dev.config.js webpack-prd.config.js tsconfig.json tslint.json ./ | ||
COPY package.json package-lock.json webpack.config.js webpack-dev.config.js webpack-prd.config.js tsconfig.json tslint.json ./ | ||
|
||
# unsafe-perm true is required to work around an npm bug since we are running as root, have a git+HTTPS repo source and it has a `prepare` script (perfect storm). | ||
# see https://github.com/npm/npm/issues/17346 | ||
RUN npm config set unsafe-perm true && npm install --legacy-peer-deps | ||
|
||
# copy in src local files | ||
# Note: *.html files in src/angular-app aren't necessary for webpack compilation, however changes to HTML files will invalidate this layer | ||
COPY src/angular-app ./src/angular-app | ||
COPY src/appManifest ./src/appManifest | ||
COPY src/js ./src/js | ||
COPY src/json ./src/json | ||
COPY src/sass ./src/sass | ||
COPY src/service-worker ./src/service-worker | ||
COPY src/Site/views ./src/Site/views | ||
COPY src/Site/views/languageforge/theme/default/sass/ ./src/Site/views/languageforge/theme/default/sass | ||
COPY src/Site/views/shared/*.scss ./src/Site/views/shared/ | ||
|
||
FROM ui-builder-base AS production-ui-builder | ||
ENV NPM_BUILD_SUFFIX=prd | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM node:14.16.1-alpine3.11 | ||
COPY package.json package-lock.json ./ | ||
RUN npm config set unsafe-perm true && npm install -g [email protected] | ||
RUN npm config set unsafe-perm true && npm install --legacy-peer-deps |
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,6 +1,7 @@ | ||
# https://caddyserver.com/docs/caddyfile | ||
{ | ||
#debug | ||
#auto_https disable_redirects | ||
} | ||
|
||
localhost { | ||
|
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
Oops, something went wrong.