File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments