This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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
1 parent
d8aa220
commit 4b92784
Showing
24 changed files
with
402 additions
and
90 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,29 @@ | ||
# Dynalite | ||
*.out | ||
|
||
# OSX | ||
.DS_Store | ||
|
||
# doit | ||
.doit.db | ||
|
||
# Virtual Environment | ||
venv | ||
|
||
# Eggs | ||
.eggs | ||
subhub.egg-info | ||
|
||
# Node | ||
node_modules | ||
|
||
# Visual Studio Code | ||
.vscode | ||
|
||
# PyCharm | ||
.idea | ||
|
||
.vscode/ | ||
.tox | ||
venv | ||
.doit.db |
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,33 @@ | ||
FROM python:3.7-alpine | ||
MAINTAINER Stewart Henderson <shenderson@mozilla.com> | ||
|
||
ARG STRIPE_API_KEY | ||
ARG AWS_ACCESS_KEY_ID | ||
ARG AWS_SECRET_ACCESS_KEY | ||
ARG LOCAL_FLASK_PORT | ||
ARG SUPPORT_API_KEY | ||
|
||
ENV STRIPE_API_KEY=$STRIPE_API_KEY | ||
ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID | ||
ENV AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY | ||
ENV LOCAL_FLASK_PORT=$LOCAL_FLASK_PORT | ||
ENV SUPPORT_API_KEY=$SUPPORT_API_KEY | ||
|
||
ENV FLASK_ENV=development | ||
EXPOSE $LOCAL_FLASK_PORT | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN apk add bash==5.0.0-r0 | ||
RUN bin/install-packages.sh | ||
RUN pip install -r automation_requirements.txt | ||
RUN pip install awscli==1.16.213 | ||
RUN yarn install | ||
|
||
RUN addgroup -g 10001 app && \ | ||
adduser -D -G app -h /app -u 10001 app | ||
|
||
USER app | ||
ENTRYPOINT ["doit", "local"] |
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,18 @@ | ||
build-base | ||
libgit2-dev | ||
libc-dev | ||
python3-dev | ||
libffi-dev | ||
openssl-dev | ||
zeromq-dev | ||
linux-headers | ||
nodejs | ||
curl | ||
yarn | ||
gcc==8.3.0-r0 | ||
g++ | ||
musl-dev | ||
pkgconfig | ||
git | ||
graphviz-dev | ||
graphviz |
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# NOTE: This script is used to provision both TravisCI and Jenkins, AWS credentials and configuration | ||
# Reference AWS Environment Variables | ||
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html | ||
|
||
mkdir -p ~/.aws | ||
|
||
cat > ~/.aws/credentials << EOL | ||
[default] | ||
aws_access_key_id = ${AWS_ACCESS_KEY_ID:-fake-id} | ||
aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY:-fake-key} | ||
EOL | ||
|
||
cat >~/.aws/config <<-EOF | ||
[default] | ||
output=json | ||
region=${AWS_DEFAULT_REGION:-us-west-2} | ||
EOF |
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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# NOTE: This bash script is used as an entry point from this application's docker image. | ||
|
||
sudo su | ||
|
||
printenv | ||
doit venv | ||
#/app/venv/bin/python -m setup develop | ||
doit local |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Alpine Registry for package versions, https://pkgs.alpinelinux.org/packages | ||
apk update | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
IFS=$'\n' read -d '' -r -a lines < "${DIR}/alpine-packages" | ||
apk add "${lines[@]}" |
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,17 @@ | ||
version: "3.7" | ||
|
||
services: | ||
subhub: | ||
container_name: subhub | ||
build: | ||
context: . | ||
args: | ||
AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" | ||
AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" | ||
STRIPE_API_KEY: "sk_test_123" | ||
SUPPORT_API_KEY: "support_test" | ||
# NOTE: This enables debug logging of the Stripe API when running in docker-compose. | ||
STRIPE_LOG: "debug" | ||
LOCAL_FLASK_PORT: 5000 | ||
ports: | ||
- "5000:5000" |
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 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
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 +1 @@ | ||
/Users/mballard/PycharmProjects/subhub/subhub | ||
../../subhub |
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
Oops, something went wrong.