Skip to content

Commit 86b7e4c

Browse files
committed
Modify gunicorn service unit file to include environment variables after reboot
1 parent adc28b7 commit 86b7e4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

0x1A-application_server/gunicorn.service

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ After=syslog.target
77
User=ubuntu
88
Group=www-data
99
WorkingDirectory=/home/ubuntu/AirBnB_clone_v4
10+
Environment="HBNB_MYSQL_USER=hbnb_dev"
11+
Environment="HBNB_MYSQL_PWD=hbnb_dev_pwd"
12+
Environment="HBNB_MYSQL_HOST=localhost"
13+
Environment="HBNB_MYSQL_DB=hbnb_dev_db"
14+
Environment="HBNB_TYPE_STORAGE=db"
15+
ExecStartPre=/usr/bin/tmux new-session -d 'gunicorn --bind 0.0.0.0:5002 api.v1.app:app'
1016
ExecStart=/home/ubuntu/.local/bin/gunicorn --workers 3 --bind 0.0.0.0:5003 web_dynamic.2-hbnb:app --access-logfile /tmp/airbnb-access.log --error-logfile /tmp/airbnb-error.log
1117
Restart=on-failure
1218

0 commit comments

Comments
 (0)