Commit af8fa705 authored by Benjamin Bouvier's avatar Benjamin Bouvier

Fix Dockerfile and docker instructions;

parent 0e7a5770
......@@ -20,7 +20,7 @@ docker build -t phyks/flatisfy .
mkdir flatisfy
cd flatisfy
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
```
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
......
......@@ -26,25 +26,18 @@ RUN git clone --depth 1 https://git.weboob.org/weboob/devel /home/user/weboob \
RUN mkdir -p /flatisfy/data
VOLUME /flatisfy
# Install Flatisfy.
COPY ./*.sh /home/user/
# Install Flatisfy, set up directories and permissions.
RUN cd /home/user \
&& git clone https://git.phyks.me/Phyks/flatisfy/ ./app \
&& git clone https://framagit.org/phyks/Flatisfy/ ./app \
&& cd ./app \
&& pip install -r requirements.txt \
&& npm install \
&& npm run build:prod
RUN chown user:user -R /home/user
RUN mkdir -p /home/user/.local/share/flatisfy
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
&& npm run build:prod \
&& mkdir -p /home/user/.local/share/flatisfy \
&& chown user:user -R /home/user \
&& chmod +x /home/user/*.sh
# Run server.
EXPOSE 8080
......
#!/bin/bash
set -e
echo "Fetching new housing posts..."
cd /home/user/app
python -m flatisfy import -v --config /flatisfy/config.json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment