Update Dockerfile, fix for #96
This commit is contained in:
parent
e5d5c8373c
commit
f29204265c
@ -39,10 +39,9 @@ RUN mkdir -p /home/user/.local/share/flatisfy
|
|||||||
|
|
||||||
COPY ./run.sh /home/user/run.sh
|
COPY ./run.sh /home/user/run.sh
|
||||||
RUN chmod +x /home/user/run.sh
|
RUN chmod +x /home/user/run.sh
|
||||||
COPY ./fetch.sh /home/user/fetch.sh
|
COPY ./update_weboob.sh /home/user/update_weboob.sh
|
||||||
RUN chmod +x /home/user/fetch.sh
|
RUN chmod +x /home/user/update_weboob.sh
|
||||||
|
|
||||||
# Run server.
|
# Run server.
|
||||||
USER user
|
|
||||||
CMD /home/user/run.sh
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
CMD /home/user/run.sh
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Updating Weboob..."
|
|
||||||
cd /home/user/weboob
|
|
||||||
git pull
|
|
||||||
pip install --upgrade .
|
|
||||||
|
|
||||||
echo "Fetching housing posts..."
|
|
||||||
cd /home/user/app
|
|
||||||
python -m flatisfy import -v --config /flatisfy/config.json
|
|
@ -1,16 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Setting fake values for git config..."
|
echo "Update Weboob..."
|
||||||
git config --global user.email flatisfy@example.com
|
/home/user/update_weboob.sh
|
||||||
git config --global user.name "Flatisfy Root"
|
|
||||||
|
|
||||||
echo "Building data for Flatisfy..."
|
echo "Building data for Flatisfy..."
|
||||||
cd /home/user/app
|
cd /home/user/app
|
||||||
python -m flatisfy build-data -v --config /flatisfy/config.json
|
su user -c "python -m flatisfy build-data -v --config /flatisfy/config.json"
|
||||||
|
|
||||||
echo "Fetching new housing posts..."
|
echo "Fetching new housing posts..."
|
||||||
/home/user/fetch.sh
|
cd /home/user/app
|
||||||
|
su user -c "python -m flatisfy import -v --config /flatisfy/config.json"
|
||||||
|
|
||||||
echo "Starting web UI..."
|
echo "Starting web UI..."
|
||||||
python -m flatisfy serve -v --config /flatisfy/config.json
|
exec su user -c "python -m flatisfy serve -v --config /flatisfy/config.json"
|
||||||
|
11
docker/update_weboob.sh
Normal file
11
docker/update_weboob.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Setting fake values for git config..."
|
||||||
|
git config --global user.email flatisfy@example.com
|
||||||
|
git config --global user.name "Flatisfy Root"
|
||||||
|
|
||||||
|
echo "Updating Weboob..."
|
||||||
|
cd /home/user/weboob
|
||||||
|
git pull
|
||||||
|
pip install --upgrade .
|
Loading…
Reference in New Issue
Block a user