Fix Dockerfile and docker instructions;
This commit is contained in:
parent
0e7a577041
commit
af8fa705dd
@ -20,7 +20,7 @@ docker build -t phyks/flatisfy .
|
|||||||
mkdir flatisfy
|
mkdir flatisfy
|
||||||
cd flatisfy
|
cd flatisfy
|
||||||
FLATISFY_VOLUME=$(pwd)
|
FLATISFY_VOLUME=$(pwd)
|
||||||
docker run -it -e LOCAL_USER_ID=`id -u` -v $FLATISFY_VOLUME:/flatisfy phyks/flatisfy sh -c "cd /home/user/app && python -m flatisfy init-config > /flatisfy/config.json"
|
docker run --rm -it -e LOCAL_USER_ID=`id -u` -v $FLATISFY_VOLUME:/flatisfy phyks/flatisfy sh -c "cd /home/user/app && python -m flatisfy init-config > /flatisfy/config.json"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ Your Flatisfy instance is now available at `localhost:8080`!
|
|||||||
To fetch new housing posts, you should manually call
|
To fetch new housing posts, you should manually call
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -it -e LOCAL_USER_ID=`id -u` -v $FLATISFY_VOLUME:/flatisfy phyks/flatisfy /home/user/fetch.sh
|
docker run --rm -it -e LOCAL_USER_ID=`id -u` -v $FLATISFY_VOLUME:/flatisfy phyks/flatisfy /home/user/fetch.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This can be done easily in a crontask on your host system, to run it typically
|
This can be done easily in a crontask on your host system, to run it typically
|
||||||
|
@ -26,25 +26,18 @@ RUN git clone --depth 1 https://git.weboob.org/weboob/devel /home/user/weboob \
|
|||||||
RUN mkdir -p /flatisfy/data
|
RUN mkdir -p /flatisfy/data
|
||||||
VOLUME /flatisfy
|
VOLUME /flatisfy
|
||||||
|
|
||||||
# Install Flatisfy.
|
COPY ./*.sh /home/user/
|
||||||
|
|
||||||
|
# Install Flatisfy, set up directories and permissions.
|
||||||
RUN cd /home/user \
|
RUN cd /home/user \
|
||||||
&& git clone https://git.phyks.me/Phyks/flatisfy/ ./app \
|
&& git clone https://framagit.org/phyks/Flatisfy/ ./app \
|
||||||
&& cd ./app \
|
&& cd ./app \
|
||||||
&& pip install -r requirements.txt \
|
&& pip install -r requirements.txt \
|
||||||
&& npm install \
|
&& npm install \
|
||||||
&& npm run build:prod
|
&& npm run build:prod \
|
||||||
|
&& mkdir -p /home/user/.local/share/flatisfy \
|
||||||
RUN chown user:user -R /home/user
|
&& chown user:user -R /home/user \
|
||||||
RUN mkdir -p /home/user/.local/share/flatisfy
|
&& chmod +x /home/user/*.sh
|
||||||
|
|
||||||
COPY ./run.sh /home/user/run.sh
|
|
||||||
RUN chmod +x /home/user/run.sh
|
|
||||||
|
|
||||||
COPY ./entrypoint.sh /home/user/entrypoint.sh
|
|
||||||
RUN chmod +x /home/user/entrypoint.sh
|
|
||||||
|
|
||||||
COPY ./update_weboob.sh /home/user/update_weboob.sh
|
|
||||||
RUN chmod +x /home/user/update_weboob.sh
|
|
||||||
|
|
||||||
# Run server.
|
# Run server.
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
7
docker/fetch.sh
Normal file
7
docker/fetch.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Fetching new housing posts..."
|
||||||
|
cd /home/user/app
|
||||||
|
python -m flatisfy import -v --config /flatisfy/config.json
|
||||||
|
|
Loading…
Reference in New Issue
Block a user