This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
gitsearch.yml 5.33 KiB
Newer Older
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
version: '3.5'
volumes:
  postgres_data:
    driver: local
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
services:
  gitsearch-app:
Eduard Frankford's avatar
Eduard Frankford committed
    image: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch/$GITBRANCH
    container_name: sharing_search
    restart: always
    hostname: sharing_search
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
    environment:
      - _JAVA_OPTIONS=-Xmx512m -Xms256m
      - SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
      - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
      - SPRING_DATASOURCE_URL=jdbc:mysql://sharing_mysql:3306/gitsearch?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
      - JHIPSTER_SLEEP=15 # gives a small time for other services to boot before the application
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
      - SPRING_DATA_JEST_URI=http://sharing_elasticsearch:9200
      - SPRING_ELASTICSEARCH_REST_URIS=http://sharing_elasticsearch:9200
      # see https://stackoverflow.com/questions/62676762/how-can-a-variable-set-in-the-docker-env-file-be-used-in-application-yml
      - JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64SECRET=${JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64SECRET}
      - SECURITY_OAUTH2_CLIENT_PROVIDER_GITLABOIDC_ISSUERURI=${SECURITY_OAUTH2_CLIENT_PROVIDER_GITLABOIDC_ISSUERURI}
      - SECURITY_OAUTH2_CLIENT_REGISTRATION_GITLABOIDC_CLIENTID=${SECURITY_OAUTH2_CLIENT_REGISTRATION_GITLABOIDC_CLIENTID}
      - SECURITY_OAUTH2_CLIENT_REGISTRATION_GITLABOIDC_CLIENTSECRET=${SECURITY_OAUTH2_CLIENT_REGISTRATION_GITLABOIDC_CLIENTSECRET}
      - APPLICATION_GITLAB_GENERALACCESSTOKEN=${APPLICATION_GITLAB_GENERALACCESSTOKEN}
Michael Breu's avatar
Michael Breu committed
      - APPLICATION_GITLAB_ADMINACCESSTOKEN=${APPLICATION_GITLAB_ADMINACCESSTOKEN}
      - CONNECTOR_ARTEMIS_TOKEN=${CONNECTOR_ARTEMIS_TOKEN}
      - gitBranch=${GITBRANCH}
      - gitCommitId=${COMMIT_ID}
      - gitCommitDate=${COMMIT_DATE}
      - GITSEARCH_PATH=/home/contDeploy/gitsearch2/gitsearch
eduardDeploy's avatar
eduardDeploy committed
      - OIDC_KEYCLOAK_CLIENTID=${OIDC_KEYCLOAK_CLIENTID}
Eduard Frankford's avatar
Eduard Frankford committed
      # - SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/auth/realms/jhipster
      # - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=web_app
      # - SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=web_app
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
    ports:
      - 10084:8080
    depends_on:
      - keycloak
      - sharing_mysql
eduardDeploy's avatar
eduardDeploy committed
      - sharing_elasticsearch
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
    networks:
      - backend
      - frontend
  sharing_mysql:
    image: mysql:8.0.20
    container_name: sharing_mysql
    hostname: sharing_mysql
    volumes:
      - '$MYSQL_HOME:/var/lib/mysql/'
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
    environment:
      - MYSQL_USER=root
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
      - MYSQL_DATABASE=gitsearch
    command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
Daniel Crazzolara's avatar
Daniel Crazzolara committed
    restart: always
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
    networks:
      - backend
  postgres:
    image: postgres
    volumes:
      - postgres_data:/var/lib/postgresql/data1
    environment:
      - POSTGRES_DB=keycloak
      - POSTGRES_USER=${POSTGRES_USER_KEYCLOAK}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    restart: always
    networks:
      - backend
      - frontend
    depends_on:
      - sharing_mysql
  keycloak:
    image: quay.io/keycloak/keycloak:18.0.2-legacy
    environment:
      - DB_VENDOR=POSTGRES
      - DB_ADDR=postgres
      - DB_DATABASE=keycloak
      - DB_USER=${POSTGRES_USER_KEYCLOAK}
      - DB_SCHEMA=public
      - DB_PASSWORD=${POSTGRES_PASSWORD}
      - KEYCLOAK_USER=${KEYCLOAK_USER}
      - KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}
      - PROXY_ADDRESS_FORWARDING=true
      - GITSEARCH_PATH=$GITSEARCH_PATH
      # Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
      #JDBC_PARAMS: "ssl=true"
    ports:
      - 8082:8080
    restart: always
eduardDeploy's avatar
eduardDeploy committed
    volumes:
      - $GITSEARCH_PATH/src/main/resources/keycloak-theme/themes/gitsearch:/opt/jboss/keycloak/themes/gitsearch
      #- /home/contDeploy/gitsearch2/gitsearch/src/main/resources/keycloak-theme/themes/gitsearch:/opt/jboss/keycloak/themes/gitsearch
eduardDeploy's avatar
eduardDeploy committed
      # - ../resources/keycloak-theme/configuration:/opt/jboss/keycloak/standalone/configuration
    depends_on:
      - postgres
    networks:
      - backend
      - frontend
eduardDeploy's avatar
eduardDeploy committed
  sharing_elasticsearch:
    image: 'docker.elastic.co/elasticsearch/elasticsearch:7.17.6'
    container_name: sharing_elasticsearch
    restart: always
    # volumes:
    #   - ~/volumes/jhipster/gitsearch/elasticsearch/:/usr/share/elasticsearch/data/
    # If you want to expose these ports outside your dev PC,
    # remove the "127.0.0.1:" prefix
    ports:
      - '9200:9200' # add this for your local testing setup
      - '9300:9300' # add this for your local testing setup
    environment:
      - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
      - node.name=es01
      - cluster.name=sharing_elasticsearch
      - discovery.type=single-node
      - xpack.security.enabled=false
    volumes:
      - '/mnt/qt-codeability-austria/sharing/es/data:/usr/share/elasticsearch/data' # change this path for production
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      backend:
        ipv4_address: 172.22.2.24
Lukas Kaltenbrunner's avatar
Lukas Kaltenbrunner committed
networks:
  frontend:
    name: sharing_frontend
    driver: bridge
  backend:
    name: sharing_backend
    driver: bridge
    internal: true