mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
fixing permissions, simplyfying the start.sh script
This commit is contained in:
6
.env
Normal file
6
.env
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#GLOBAL
|
||||||
|
APP_DATA_LOCATION=/path/to/docker_appdata
|
||||||
|
APP_CONFIG_LOCATION=/path/to/docker_config
|
||||||
|
LOGS_LOCATION=/path/to/logs
|
||||||
|
|
||||||
|
|
||||||
@@ -34,9 +34,7 @@ RUN ln -s /home/pi/pialert/install/index.html /var/www/html/index.html \
|
|||||||
|
|
||||||
EXPOSE 20211
|
EXPOSE 20211
|
||||||
|
|
||||||
# https://github.com/rtsp/docker-lighttpd/blob/main/Dockerfile
|
# it's easy for permissions set in Git to be overridden, so doing it manually
|
||||||
# > this one maybe better? https://hub.docker.com/r/jitesoft/lighttpd
|
RUN chmod -R a+rxw /home/pi/pialert/
|
||||||
# Todo, refacto CMD so that we can run lighttpd and make it respond instant
|
|
||||||
# The above Dockerfile is doing this well, but i don't see why it isn't working for us
|
|
||||||
|
|
||||||
CMD ["/home/pi/pialert/dockerfiles/start.sh"]
|
CMD ["/home/pi/pialert/dockerfiles/start.sh"]
|
||||||
|
|||||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
pialert:
|
||||||
|
build: .
|
||||||
|
container_name: pialert_dev
|
||||||
|
network_mode: "host"
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config
|
||||||
|
- ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db
|
||||||
|
- ${LOGS_LOCATION}/tmp:/home/pi/pialert/log
|
||||||
|
environment:
|
||||||
|
- TZ=France/Paris
|
||||||
|
- HOST_USER_ID=1036
|
||||||
|
- HOST_USER_GID=1000
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
/home/pi/pialert/dockerfiles/user-mapping.sh
|
/home/pi/pialert/dockerfiles/user-mapping.sh
|
||||||
# probably too broad permissions
|
|
||||||
chmod -R 755 /home/pi/pialert
|
|
||||||
chmod -R 755 /var/www/html/pialert
|
#chmod -R 755 /var/www/html/pialert
|
||||||
chmod -R o+w /home/pi/pialert/db
|
#chmod -R o+w /home/pi/pialert/db
|
||||||
/etc/init.d/lighttpd start
|
/etc/init.d/lighttpd start
|
||||||
service cron start && tail -f /dev/null
|
cron -f
|
||||||
|
|||||||
Reference in New Issue
Block a user