Skip to content

Commit b0eb17b

Browse files
adding files for assignment
1 parent e5e6027 commit b0eb17b

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

utils/application.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
spring.datasource.url=jdbc:mysql://52.91.138.232:3306/springguru
2+
spring.datasource.username=spring_guru_owner
3+
spring.datasource.password=GuruPassword
4+
spring.jpa.hibernate.ddl-auto=update

utils/springbootservice.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
1. change to root - sudo su
2+
2. cd /etc/systemd/system
3+
3. use vi to create file below
4+
4. run systemctl daemon-reload (to reload service defs)
5+
5. to start on boot run: systemctl enable springboot.service
6+
6. to start: systemctl start springboot
7+
8+
## View console output
9+
tail -f /var/log/messages
10+
11+
### File name springboot.service ####
12+
13+
[Unit]
14+
Description=Spring Boot Service
15+
After=syslog.target
16+
17+
[Service]
18+
User=ec2-user
19+
# set dir to location of application.properties and springboot jar
20+
WorkingDirectory=/home/ec2-user
21+
ExecStart=/bin/java -jar spring-core-devops-0.0.1.jar
22+
SuccessExitStatus=143
23+
24+
[Install]
25+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)