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

chore: up to date mysql / switch to 5.7.36 #8

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 12 additions & 9 deletions devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ components:
- name: m2
volume:
size: 1G

- name: mysql
container:
image: quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764
# copy of mysql:5.7.36
image: quay.io/vgulyy/che--mysql:5.7.36
memoryLimit: 300Mi
endpoints:
- exposure: none
- exposure: internal
name: db
protocol: tcp
targetPort: 3306
Expand All @@ -41,18 +42,20 @@ components:
- name: MYSQL_DATABASE
value: petclinic
- name: PS1
value: $(echo ${0})\\$
value: $(echo ${0}) $
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: allow

commands:
- id: prepare-database
exec:
component: mysql
workingDir: ${PROJECTS_ROOT}/java-spring-petclinic
commandLine: |
/opt/rh/rh-mysql57/root/usr/bin/mysql -u root < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/user.sql && \
/opt/rh/rh-mysql57/root/usr/bin/mysql -u root petclinic < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/schema.sql && \
/opt/rh/rh-mysql57/root/usr/bin/mysql -u root petclinic < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/data.sql && \
echo -e "\e[32mDone.\e[0m Database petclinic was configured"
mysql -u root < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/user.sql && \
mysql -u root petclinic < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/schema.sql && \
mysql -u root petclinic < ${PROJECTS_ROOT}/java-spring-petclinic/src/main/resources/db/mysql/data.sql && \
echo "\e[32mDone.\e[0m Database petclinic was configured"
group:
kind: run
isDefault: true
Expand Down Expand Up @@ -81,7 +84,7 @@ commands:
component: tools
workingDir: ${PROJECTS_ROOT}/java-spring-petclinic
commandLine: |
java -jar -Dspring-boot.run.profiles=mysql \
java -jar -Dspring.profiles.active=mysql \
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 \
target/*.jar
group:
Expand Down