generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
340 changed files
with
59,339 additions
and
79,441 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 |
---|---|---|
|
@@ -8,23 +8,6 @@ on: | |
types: | ||
- published | ||
jobs: | ||
webapi: | ||
runs-on: ubuntu-latest | ||
name: Build and push Web API Container to Docker Hub | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: build-and-push-image | ||
uses: docker/build-push-action@v1 | ||
with: | ||
dockerfile: ./Dockerfile-jared | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: foodoasisla/foodoasisla | ||
tag_with_ref: true | ||
tag_with_sha: true | ||
add_git_labels: true | ||
labels: description="Food Oasis",maintained="[email protected]" | ||
fullstack: | ||
runs-on: ubuntu-latest | ||
name: Build and push Full-Stack Container to Docker Hub | ||
|
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,28 @@ | ||
# build and push a docker image from the latest push to "develop" branch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
release: | ||
types: | ||
- published | ||
jobs: | ||
webapi: | ||
runs-on: ubuntu-latest | ||
name: Build and push Web API Container to Docker Hub | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: build-and-push-image | ||
uses: docker/build-push-action@v1 | ||
with: | ||
dockerfile: ./Dockerfile-jared | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: foodoasisla/foodoasisla | ||
tag_with_ref: true | ||
tag_with_sha: true | ||
add_git_labels: true | ||
labels: description="Food Oasis",maintained="[email protected]" | ||
|
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,6 +1,6 @@ | ||
FROM node:alpine as clientBuilder | ||
FROM node:lts-alpine as clientBuilder | ||
|
||
ENV NODE_ENV "development" | ||
ENV NODE_ENV "production" | ||
ENV NODE_OPTIONS=--openssl-legacy-provider | ||
|
||
RUN mkdir /app | ||
|
@@ -13,29 +13,43 @@ COPY client . | |
RUN npm run build | ||
RUN echo package.json | ||
|
||
# Server Build Container | ||
FROM node:lts-alpine as serverBuilder | ||
|
||
WORKDIR /usr/src | ||
COPY tsconfig.json ./ | ||
WORKDIR /usr/src/app | ||
RUN mkdir build | ||
COPY ./server/tsconfig.json ./ | ||
|
||
COPY ./server/package.json ./ | ||
COPY ./server/package-lock.json ./ | ||
|
||
COPY ./server/middleware/ ./middleware | ||
COPY ./server/types/ ./types | ||
COPY ./server/app/ ./app | ||
COPY ./server/server.ts ./ | ||
RUN npm ci --quiet && npm run build | ||
|
||
# Server Container | ||
FROM node:12-buster-slim | ||
FROM node:buster-slim | ||
LABEL maintainer.fola="[email protected]" | ||
LABEL org.hackforla="Hack For LA" | ||
LABEL description="Food Oasis app" | ||
|
||
WORKDIR /fola | ||
WORKDIR /fola | ||
COPY ./server/package.json ./ | ||
COPY ./server/package-lock.json ./ | ||
RUN npm ci | ||
RUN npm ci --quiet | ||
|
||
# TODO @jafow re-structure directory heirarchy so we can flatten these down | ||
COPY ./server/middleware/ ./middleware | ||
COPY --from=serverBuilder /usr/src/app/build ./ | ||
COPY ./server/uploads ./uploads | ||
COPY ./server/app/ ./app | ||
COPY ./server/server.js ./ | ||
#COPY db/config.js ./db/ | ||
COPY --from=clientBuilder /app/build ./client/build | ||
|
||
# we dont want to run as sudo so create group and user | ||
# we don't want to run as sudo so create group and user | ||
RUN groupadd -r fola && useradd --no-log-init -r -g fola fola | ||
USER fola | ||
|
||
EXPOSE 5001 | ||
|
||
ENTRYPOINT ["/usr/local/bin/node", "server.js"] | ||
ENTRYPOINT ["/usr/local/bin/node", "./server.js"] |
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,34 +1,40 @@ | ||
FROM jred/nodejs:12.17 as builder | ||
LABEL maintainer="[email protected]" | ||
LABEL description="Nodejs docker base image" | ||
# Server Build Container | ||
FROM node:lts-alpine as serverBuilder | ||
|
||
WORKDIR /usr/src | ||
COPY tsconfig.json ./ | ||
WORKDIR /usr/src/app | ||
RUN mkdir build | ||
COPY ./server/tsconfig.json ./ | ||
|
||
FROM node:12.17-buster-slim | ||
LABEL maintainer.fola="[email protected]" | ||
LABEL org.hackforla="Hack For LA" | ||
LABEL description="Food Oasis app" | ||
COPY ./server/package.json ./ | ||
COPY ./server/package-lock.json ./ | ||
|
||
ENV NODE_ENV "development" | ||
COPY ./server/middleware/ ./middleware | ||
COPY ./server/types/ ./types | ||
COPY ./server/app/ ./app | ||
COPY ./server/server.ts ./ | ||
RUN npm ci --quiet && npm run build | ||
|
||
COPY --from=builder /usr/local/bin/ /usr/local/bin/ | ||
# Server Container | ||
FROM node:buster-slim | ||
LABEL maintainer.fola="[email protected]" | ||
LABEL org.hackforla="Hack For LA" | ||
LABEL description="Food Oasis app" | ||
|
||
WORKDIR /fola | ||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
RUN npm ci | ||
WORKDIR /fola | ||
COPY ./server/package.json ./ | ||
COPY ./server/package-lock.json ./ | ||
RUN npm ci --quiet | ||
|
||
# TODO @jafow re-structure directory heirarchy so we can flatten these down | ||
COPY ./server/middleware/ ./middleware | ||
COPY ./server/app/ ./app | ||
COPY ./server/server.js ./ | ||
COPY ./server/db/config.js ./db/ | ||
COPY ./server/entrypoint.sh ./ | ||
COPY --from=serverBuilder /usr/src/app/build ./ | ||
COPY ./server/uploads ./uploads | ||
|
||
# we dont want to run as sudo so create group and user | ||
# we don't want to run as sudo so create group and user | ||
RUN groupadd -r fola && useradd --no-log-init -r -g fola fola | ||
USER fola | ||
|
||
EXPOSE 5001 | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] | ||
CMD ["node", "server.js"] | ||
ENTRYPOINT ["/usr/local/bin/node", "./server.js"] | ||
|
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,3 @@ | ||
REACT_APP_TENANT_ID=1 | ||
REACT_APP_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibHVjYXNob21lciIsImEiOiJjazFqcnRjcm0wNmZ1M2JwZXg2eDFzMXd3In0.yYpkKLrFCxF-qyBfZH1a8w | ||
REACT_APP_TAMU_GEOSERVICES_API_KEY=5c141ed805794a7a9562c22c090a71cb | ||
SKIP_PREFLIGHT_CHECK=true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.