Skip to content

Commit 932c919

Browse files
Add config files
1 parent 5e4a9bc commit 932c919

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

deployment/nginx-notes-config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
server {
2+
server_name notes.pl-coding.com; # replace with your domain
3+
4+
location / {
5+
proxy_pass http://127.0.0.1:8085; # replace with your port
6+
proxy_http_version 1.1;
7+
proxy_set_header Host $host;
8+
proxy_set_header X-Real-IP $remote_addr;
9+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
10+
proxy_set_header X-Forwarded-Proto $scheme;
11+
}
12+
}

deployment/notes.service

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Spring Boot Notes Application
3+
After=network.target
4+
5+
[Service]
6+
User=admin
7+
Group=admin
8+
EnvironmentFile=/etc/default/notes-env
9+
ExecStart=/usr/bin/java -jar /opt/notes/notes.jar
10+
Restart=always
11+
RestartSec=5
12+
13+
[Install]
14+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)