Skip to content
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

Remove running of non-existent sql file. Add volume for needed shell script #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions deploy/deploy.conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ DEPLOY_BUILD_DIR="${_repo_dir}/deploy/build"
DEPLOY_VAR_DIR="${_repo_dir}/deploy/var"
DEPLOY_COMPOSE_DIR="${_repo_dir}/deploy/docker-compose"

export API_HOST="${API_HOST:-localhost}"

unset _script_dir
unset _repo_dir

Expand All @@ -18,17 +20,17 @@ declare -a REPO_NAMES=(\
)

declare -A REPO_URL_MAP=(\
[gamechanger-web]="https://github.com/dod-advana/gamechanger-web" \
[gamechanger-data]="https://github.com/dod-advana/gamechanger-data.git" \
[gamechanger-ml]="https://github.com/dod-advana/gamechanger-ml.git" \
[gamechanger-web]="https://github.com/shanedell/gamechanger-web" \
[gamechanger-data]="https://github.com/shanedell/gamechanger-data.git" \
[gamechanger-ml]="https://github.com/shanedell/gamechanger-ml.git" \
[gamechanger-neo4j-plugin]="https://github.com/dod-advana/gamechanger-neo4j-plugin.git" \
[gamechanger-crawlers]="https://github.com/dod-advana/gamechanger-crawlers.git" \
)

declare -A REPO_TAG_MAP=(\
[gamechanger-web]="dev" \
[gamechanger-data]="dev" \
[gamechanger-ml]="dev" \
[gamechanger-web]="patch-yarnlock-docker-prod" \
[gamechanger-data]="patch-dockerfiles" \
[gamechanger-ml]="patch-reqs" \
[gamechanger-neo4j-plugin]="main" \
[gamechanger-crawlers]="dev" \
)
Expand Down
52 changes: 45 additions & 7 deletions deploy/docker-compose/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,30 @@ services:
REACT_APP_GC_DECOUPLED: "true"
REACT_APP_NODE_ENV: "development"
REACT_APP_GLUU_SSO: "disabled"
REACT_APP_BACKEND_URL: "http://localhost:8080"
REACT_APP_MATOMO_LINK: "http://matomo"
REACT_APP_BACKEND_URL: "http://${API_HOST}:8080"
REACT_APP_MATOMO_LINK: "matomo"
REACT_APP_DATA_CATALOG_LINK: "http://data-catalog.local:8443"
REACT_APP_CLASSIFICATION_BANNER: "UNCLASSIFIED"
REACT_APP_CLASSIFICATION_BANNER_COLOR: "GREEN"
REACT_APP_MEGA_MENU_ENDPOINT: "http://localhost:8080/api/gamechanger/megamenu/links"
REACT_APP_TUTORIAL_HREF: "http://localhost:8080"
REACT_APP_USER_TOKEN_ENDPOINT: "http://localhost:8080/api/auth/token"
REACT_APP_MEGA_MENU_ENDPOINT: "http://${API_HOST}:8080/api/gamechanger/megamenu/links"
REACT_APP_TUTORIAL_HREF: "http://${API_HOST}:8080"
REACT_APP_USER_TOKEN_ENDPOINT: "http://${API_HOST}:8080/api/auth/token"
REACT_APP_SUPPORT_HREF: "https://support.local/plugins/servlet/desk/portal/5/create/113"
REACT_APP_WIKI_HREF: "http://wiki.local"
REACT_APP_LOGIN_ROUTE: "http://localhost:8080/login"
REACT_APP_LOGIN_ROUTE: "http://${API_HOST}:8080/login"
GAMECHANGER_DEMO_DEPLOYMENT: "true"
GAMECHANGER_DEMO_USER: "007"
GAMECHANGER_DISABLE_STATS_API: "true"
MYSQL_HOST_MATOMO: "mysql"
MYSQL_USER_MATOMO: "root"
MYSQL_PASSWORD_MATOMO: "password"
S3_REGION: "us-east-1"
S3_IS_MINIO: "true"
S3_ACCESS_KEY: "dev-access-key"
S3_SECRET_KEY: "dev-secret-key"
S3_ENDPOINT: "http://s3-server:9000"

volumes:
- "./deploy/build/gamechanger-web/generateCombinedEnv.sh/:/opt/app-root/src/generateCombinedEnv.sh:Z"
depends_on:
- redis
- postgres
Expand Down Expand Up @@ -160,9 +164,43 @@ services:
- "PGDATA=/pg-data"
networks:
- app-net

mysql:
image: mysql:8.0
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: matomo
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql:/var/lib/mysql
restart: always
networks:
- app-net

matomo:
image: matomo:4.3
container_name: matomo
environment:
MATOMO_DATABASE_HOST: mysql
MATOMO_DATABASE_USERNAME: root
MATOMO_DATABASE_PASSWORD: password
MATOMO_DATABASE_DBNAME: matomo
depends_on:
- mysql
ports:
- 80:80
volumes:
- matomo:/var/www/html
networks:
- app-net

data-pipelines:
image: "${GC_DATA_PIPELINES_IMAGE}"
container_name: "${COMPOSE_PROJECT_NAME:-gc}-data-pipelines"
command:
- "true"

volumes:
mysql:
matomo:
1 change: 0 additions & 1 deletion deploy/docker-compose/utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ services:
- "./deploy/build/gamechanger-web/backend/node_app/init/:/tmp/sql/:Z"
command:
- |
psql -f /tmp/sql/pop_mini_RE.sql
psql -f /tmp/sql/create_admins.sql
networks:
- app-net
Expand Down
5 changes: 4 additions & 1 deletion deploy/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function main() {
compose_wrapper run -- _update_primary_clone_config

# start up remaining services
compose_wrapper up -d -- web ml-api
compose_wrapper up -d -- ml-api
compose_wrapper up -d -- mysql
compose_wrapper up -d -- matomo
compose_wrapper up -d -- web

# wait until remaining services are up
compose_wrapper run -- _web_wait_until_ready
Expand Down