generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
69 changed files
with
28,340 additions
and
20,710 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,8 @@ | ||
.git | ||
.github | ||
.vscode | ||
*.md | ||
!README.md | ||
node_modules | ||
db/pg_data/* | ||
client/ |
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,25 @@ | ||
# build and push a docker image from the latest push to "develop" branch | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: build & push image | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: build-and-push-image | ||
uses: docker/build-push-action@v1 | ||
with: | ||
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 LA",maintained="foodoasis+hub@hackforla.org" | ||
|
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 |
---|---|---|
|
@@ -242,6 +242,4 @@ node_modules | |
/.vscode | ||
|
||
# End of project-specific exclusions | ||
|
||
# Remove package-lock | ||
package-lock.json | ||
# |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM jred/nodejs:12.17 as builder | ||
LABEL maintainer="jared.a.fowler@gmail.com" | ||
LABEL description="Nodejs docker base image" | ||
|
||
|
||
FROM node:12.17-buster-slim | ||
LABEL maintainer.fola="darragh@entrotech.net" | ||
LABEL org.hackforla="Hack For LA" | ||
LABEL description="Food Oasis app" | ||
|
||
ENV NODE_ENV "development" | ||
|
||
COPY --from=builder /usr/local/bin/ /usr/local/bin/ | ||
|
||
WORKDIR /fola | ||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
RUN npm ci | ||
|
||
# TODO @jafow re-structure directory heirarchy so we can flatten these down | ||
COPY middleware/ ./middleware | ||
COPY app/ ./app | ||
COPY server.js ./ | ||
COPY db/config.js ./db/ | ||
COPY entrypoint.sh ./ | ||
|
||
# we dont 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 5000 | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] | ||
CMD ["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
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,16 @@ | ||
const neighborhoodService = require("../services/neighborhood-service"); | ||
|
||
const getAll = (req, res) => { | ||
neighborhoodService | ||
.selectAll() | ||
.then((resp) => { | ||
res.send(resp); | ||
}) | ||
.catch((err) => { | ||
res.status("404").json({ error: err.toString() }); | ||
}); | ||
}; | ||
|
||
module.exports = { | ||
getAll, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.