Skip to content
Snippets Groups Projects
Commit bbf613f4 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'malowe/master/port-update' into 'master'

Make tweaks to make + dev start process

See merge request !105
parents eb077790 ac29e36f
No related branches found
No related tags found
1 merge request!105Make tweaks to make + dev start process
Pipeline #11624 passed
SHELL = /bin/bash
dev-start: clean;
docker-compose up -d gitlab mariadb
$(MAKE) import-mariadb-tables
(CONFIG_SECRET_PATH=$$PWD/config/application/secret.properties mvn compile -e quarkus:dev -Dconfig.secret.properties=$$PWD/config/application/secret.properties -Djava.net.preferIPv4Stack=true)
setup: clean start-services;
dev-start: setup;
(CONFIG_SECRET_PATH=$$PWD/config/application/secret.properties mvn compile quarkus:dev -Dconfig.secret.properties=$$PWD/config/application/secret.properties -Djava.net.preferIPv4Stack=true)
clean:;
mvn clean
## Compilation steps
install-yarn:;
yarn install --frozen-lockfile --audit
compile: clean compile-java;
compile-quick: clean compile-java-quick;
compile-java: generate-spec;
mvn compile package
compile-java-quick: generate-spec;
mvn compile package -Dmaven.test.skip=true
compile: clean compile-java;
compile-quick: clean compile-java-quick;
install-yarn:;
yarn install --frozen-lockfile --audit
generate-spec: install-yarn validate-spec;
yarn run generate-json-schema
validate-spec: install-yarn;
compile-start: compile-quick;
docker compose down
compile-start: compile-quick start;
## Docker/service binds - services soft split from application to enable dev-start easier
start:;
docker compose build
docker compose up -d
start-services: stop-services;
docker compose up mariadb -d
start-opt: stop-opt;
docker compose --profile optional-services up -d
stop: stop-application;
stop-application:;
docker compose down
stop-services:;
docker compose stop mariadb
stop-opt:;
docker compose --profile optional-services down
stop-all: stop-application stop-services stop-opt;
## Start njs server w/ openapi spec
start-spec: validate-spec;
yarn run start
## Custom Testing calls
test-post-git-eca:;
curl http://api.eclipse.dev.docker:8090/git/eca -v -H 'Content-Type: application/json' -d @config/json/post-git-eca.json
test-dev-post-git-eca:;
curl http://api.eclipse.dev.docker:8080/git/eca -v -H 'Content-Type: application/json' -d @config/json/post-git-eca.json
gitlab-root-pw-reset:;
docker exec -it $$(docker-compose ps -q gitlab) gitlab-rake "gitlab:password:reset[root]"
import-mariadb-tables:;
./config/mariadb/import.sh
\ No newline at end of file
docker exec -it $$(docker-compose ps -q gitlab) gitlab-rake "gitlab:password:reset[root]"
\ No newline at end of file
eclipse.internal-host=localhost
## Required for authenticated requests to profile API (api.eclipse.org: git.eclipse.org/r/ (dev-git-eca-rest-api)))
## Ask webdev@eclipse-foundation.org if you think you should have access to this client.
oauth2.client-id=
......@@ -8,4 +9,5 @@ quarkus.datasource.username=
quarkus.datasource.password=
## database connection
quarkus.datasource.jdbc.url=jdbc:mariadb://mariadb/dev_eclipse_eca
\ No newline at end of file
quarkus.datasource.jdbc.url=jdbc:mariadb://mariadb/dev_eclipse_eca
%dev.quarkus.datasource.jdbc.url=jdbc:mariadb://${eclipse.internal-host}:10101/dev_eclipse_eca
\ No newline at end of file
#!/bin/bash
# ===========================================================================
# Copyright (c) 2022 Eclipse Foundation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Christopher Guindon (Eclipse Foundation)
# ==========================================================================
# Clean up database
while ! mysqladmin ping -h "$MARIADB_HOST" --silent; do
sleep 1
echo 'Waiting for mysql server to respond...'
done
FILE="config/mariadb/init.sql"
if test -f "$FILE"; then
mysql -u $MARIADB_USERNAME -p$MARIADB_PASSWORD -h $MARIADB_HOST dev_eclipse_eca < $FILE
else
echo "Unable to import. Missing the sql file: (${FILE})."
fi
File moved
version: '3'
version: '3.9'
services:
application:
build:
dockerfile: ./src/main/docker/Dockerfile.jvm
ports:
- 8090:8080
- 10100:8080
environment:
- CONFIG_SECRET_PATH=/var/run/secrets/secret.properties
volumes:
......@@ -26,6 +26,8 @@ services:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.eclipse.dev.docker'
profiles:
- optional-services
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.eclipse.dev.docker:8929'
......@@ -41,10 +43,11 @@ services:
mariadb:
image: mariadb:latest
ports:
- '3306:3306'
- '10101:3306'
volumes:
- ./config/mariadb/conf.d:/etc/mysql/conf.d
- ./volumes/mariadb:/var/lib/mysql
- ./config/mariadb/initdb.d:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_PASSWORD}
MYSQL_DATABASE: dev_eclipse_eca
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment