mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Enabling Python optimization when running in Docker and systemd.
This commit is contained in:
parent
e471325bb6
commit
ccb28db95c
3 changed files with 6 additions and 2 deletions
|
|
@ -15,5 +15,5 @@ COPY modules /opt/wrolpi/modules
|
|||
COPY requirements.txt /opt/wrolpi/requirements.txt
|
||||
RUN pip3 install -r /opt/wrolpi/requirements.txt
|
||||
|
||||
ENTRYPOINT [ "python3", "/opt/wrolpi/main.py"]
|
||||
ENTRYPOINT [ "python3", "-OO", "/opt/wrolpi/main.py"]
|
||||
CMD ["api", "--host", "0.0.0.0" ]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ PartOf=wrolpi.target
|
|||
|
||||
[Service]
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
ExecStart=/opt/wrolpi/venv/bin/python3 /opt/wrolpi/main.py -v api
|
||||
ExecStart=/opt/wrolpi/venv/bin/python3 -OO /opt/wrolpi/main.py -v api
|
||||
Group=wrolpi
|
||||
User=wrolpi
|
||||
WorkingDirectory=/opt/wrolpi/
|
||||
|
|
|
|||
|
|
@ -7,3 +7,7 @@
|
|||
cp /opt/wrolpi/nginx.conf /etc/nginx/nginx.conf
|
||||
cp /opt/wrolpi/50x.html /var/www/50x.html
|
||||
/usr/sbin/nginx -s reload
|
||||
|
||||
# Update systemd files.
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue