File tree Expand file tree Collapse file tree 4 files changed +30
-7
lines changed Expand file tree Collapse file tree 4 files changed +30
-7
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change @@ -15,3 +15,10 @@ Notes for Admins
15
15
- carousel image size:
16
16
17
17
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
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ After=network.target
7
7
[Service]
8
8
User =aahnik
9
9
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 \
12
12
--access-logfile - \
13
13
--workers 3 \
14
14
--bind unix:/run/gunicorn.sock \
Original file line number Diff line number Diff line change 1
1
server {
2
2
listen 80 ;
3
- server_name server_domain_or_IP ;
3
+ server_name iskconbarasat.com www.iskconbarasat.com ;
4
4
5
5
location = /favicon.ico { access_log off ; log_not_found off ; }
6
- location /static/ {
7
- root path/to/local-cdn;
8
6
7
+ location /static/ {
8
+ alias /var/www/iskconbarasat.com/static/;
9
9
}
10
+
10
11
location /media/ {
11
- root path/to/local-cdn ;
12
+ alias /var/www/iskconbarasat.com/media/ ;
12
13
13
14
}
14
15
location / {
15
- # include proxy_params;
16
+ include proxy_params;
16
17
proxy_pass http://unix:/run/gunicorn.sock;
17
18
}
18
19
You can’t perform that action at this time.
0 commit comments