-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bacpop-145 Docker quick run #46
Changes from all commits
c6e2223
a7bd996
ab366fd
0163d1e
e9bdc7c
d4187f5
f344503
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,5 @@ | |
"GOOGLE_CLIENT_SECRET": "$GOOGLE_SECRET", | ||
"SESSION_SECRET": "$EXPRESS_SESSION_SECRET", | ||
"GITHUB_CLIENT_ID":"$GITHUB_ID", | ||
"GITHUB_CLIENT_SECRET":"$GITHUB_SECRET", | ||
"skip_auth": false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this flag as we weren't using it anywhere! |
||
"GITHUB_CLIENT_SECRET":"$GITHUB_SECRET" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
{ | ||
"server_port": 4000, | ||
"api_url": "http://beebop-py-api:5000", | ||
"client_url": "http://localhost", | ||
"client_url": "https://localhost", | ||
"server_url": "https://localhost/api", | ||
"redis_url": "redis://beebop-redis:6379", | ||
"GOOGLE_CLIENT_ID": "1234", | ||
"GOOGLE_CLIENT_SECRET": "1234", | ||
"GOOGLE_CLIENT_ID": "$DOCKER_GOOGLE_ID", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice 😄 |
||
"GOOGLE_CLIENT_SECRET": "$DOCKER_GOOGLE_SECRET", | ||
"SESSION_SECRET": "1234", | ||
"GITHUB_CLIENT_ID": "1234", | ||
"GITHUB_CLIENT_SECRET": "1234", | ||
"skip_auth": true | ||
"GITHUB_CLIENT_ID": "$DOCKER_GITHUB_ID", | ||
"GITHUB_CLIENT_SECRET": "$DOCKER_GITHUB_SECRET" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export API_BRANCH=main | ||
export DB_LOCATION="./storage/GPS_v6_references" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,10 @@ FILE_CLEAR_SERVER=app/server/src/resources/config.json | |
|
||
export GITHUB_ID=$(vault read -field=clientid secret/beebop/auth/github) | ||
export GITHUB_SECRET=$(vault read -field=secret secret/beebop/auth/github) | ||
export DOCKER_GITHUB_ID=$(vault read -field=clientid secret/beebop/auth/devdocker/github) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry just wondering what exactly is the |
||
export DOCKER_GITHUB_SECRET=$(vault read -field=secret secret/beebop/auth/devdocker/github) | ||
export DOCKER_GOOGLE_ID=$(vault read -field=clientid secret/beebop/auth/devdocker/google) | ||
export DOCKER_GOOGLE_SECRET=$(vault read -field=secret secret/beebop/auth/devdocker/google) | ||
export PROD_GITHUB_ID=$(vault read -field=clientid secret/beebop/auth/production/github) | ||
export PROD_GITHUB_SECRET=$(vault read -field=secret secret/beebop/auth/production/github) | ||
export PROD_GOOGLE_ID=$(vault read -field=clientid secret/beebop/auth/production/google) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
npm ci --prefix app/client | ||
npm run --prefix app/client serve |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -ex | ||
|
||
export GIT_SHA=$(git -C . rev-parse --short=7 HEAD) | ||
HERE=$(realpath "$(dirname $0)") | ||
. $HERE/common | ||
|
||
if [ "$#" -eq 1 ]; then | ||
HOST=$1 | ||
|
@@ -11,10 +12,13 @@ else | |
SSL_PATH=ssl | ||
fi | ||
export HOST | ||
docker-compose up -d | ||
docker cp app/server/src/resources/config.json beebop_beebop-server_1:/app/src/resources/config.json | ||
docker cp proxy/ssl/dhparam.pem beebop_proxy_1:/run/proxy/ | ||
docker cp proxy/$SSL_PATH/certificate.pem beebop_proxy_1:/run/proxy/ | ||
docker cp proxy/$SSL_PATH/key.pem beebop_proxy_1:/run/proxy/ | ||
|
||
export GIT_SHA=$(git -C . rev-parse --short=7 HEAD) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
docker compose up -d --pull always | ||
docker cp app/server/src/resources/config.json beebop-beebop-server-1:/app/src/resources/config.json | ||
docker cp proxy/ssl/dhparam.pem beebop-proxy-1:/run/proxy/ | ||
docker cp proxy/$SSL_PATH/certificate.pem beebop-proxy-1:/run/proxy/ | ||
docker cp proxy/$SSL_PATH/key.pem beebop-proxy-1:/run/proxy/ | ||
docker run --rm -v beebop_beebop-storage:/beebop/storage mrcide/beebop-py:main \ | ||
./scripts/download_db --small storage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
HERE=$(realpath "$(dirname $0)") | ||
|
||
export VAULT_ADDR=https://vault.dide.ic.ac.uk:8200 | ||
vault login -method=github | ||
. $HERE/decrypt_config docker | ||
. $HERE/run_docker |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
npm ci --prefix app/server | ||
BEEBOP_TEST="true" npm run --prefix app/server express |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
docker-compose down | ||
docker compose down | ||
docker volume rm beebop_beebop-storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running direct from the js started throwing some fairly fundamental errors (struggling with import types). I think running ts-node should be ok with transpile-only to improve startup time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this just to be done so we can run it locally? because this works already in prod? sorry or im mistaken?