Skip to content

Commit 43c30aa

Browse files
committed
update prod config files and add template .env
1 parent 93161d5 commit 43c30aa

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

env.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# a template for .env file
2+
3+
DEBUG=False
4+
PAYMENT_GATEWAY_API_KEY=""
5+
6+
# deployment version can be any arbitrary identification string of your wish
7+
DEPLOYMENT_VERSION="TestingLocal-Tue-June-20-2023"
8+
9+
PROD=True
10+
PROD_FILES_ROOT="/var/www/"
11+
PROD_DOMAIN="iskconbarasat.com"
12+
13+
# django secret key
14+
SECRET_KEY=""
15+

notes.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ Notes for Admins
1515
- carousel image size:
1616

1717
gunicorn --bind 0.0.0.0:8000 temple_web.wsgi
18+
19+
20+
Edit gunicorn service
21+
sudo micro /etc/systemd/system/gunicorn.service
22+
23+
See django app logs
24+
sudo journalctl -u gunicorn -n 100

prod/gunicorn.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ After=network.target
77
[Service]
88
User=aahnik
99
Group=www-data
10-
WorkingDirectory=path/to/proj/src
11-
ExecStart=path/to/proj/.venv/bin/gunicorn \
10+
WorkingDirectory=/home/aahnik/temple-web/src
11+
ExecStart=/home/aahnik/temple-web/.venv/bin/gunicorn \
1212
--access-logfile - \
1313
--workers 3 \
1414
--bind unix:/run/gunicorn.sock \

prod/nginx.conf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
server {
22
listen 80;
3-
server_name server_domain_or_IP;
3+
server_name iskconbarasat.com www.iskconbarasat.com;
44

55
location = /favicon.ico { access_log off; log_not_found off; }
6-
location /static/ {
7-
root path/to/local-cdn;
86

7+
location /static/ {
8+
alias /var/www/iskconbarasat.com/static/;
99
}
10+
1011
location /media/ {
11-
root path/to/local-cdn;
12+
alias /var/www/iskconbarasat.com/media/;
1213

1314
}
1415
location / {
15-
# include proxy_params;
16+
include proxy_params;
1617
proxy_pass http://unix:/run/gunicorn.sock;
1718
}
1819

0 commit comments

Comments
 (0)