Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize tool #6

Open
sowdust opened this issue Sep 14, 2020 · 5 comments
Open

Dockerize tool #6

sowdust opened this issue Sep 14, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@sowdust
Copy link
Owner

sowdust commented Sep 14, 2020

No description provided.

@sowdust sowdust added the enhancement New feature or request label Sep 14, 2020
@Lele
Copy link

Lele commented Sep 29, 2020

Hi,
we (lab61) saw your talk at HM and we have written this version of the Dockerfile.
It is only for development purposes and it is not intended to be run in production

FROM tiagopeixoto/graph-tool:latest
RUN yes | pacman -S python-cairo
RUN yes | pacman -S python-pip
RUN yes | pacman -S git
RUN yes | pacman -S sqlite
RUN pip install virtualenv
RUN mkdir /app
WORKDIR /app
RUN git clone https://github.com/sowdust/tafferugli.git
WORKDIR tafferugli
RUN virtualenv --system-site-packages -p python3 env
RUN source env/bin/activate
RUN pip install -r requirements.txt
RUN python manage.py makemigrations
RUN python manage.py makemigrations twitter
RUN python manage.py migrate
# creating user with admin pass credentials
RUN echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'pass')" | python manage.py shell
# creating a file to startup the application
RUN echo "#!/bin/bash" > startup.sh
RUN echo "nohup /usr/bin/python manage.py process_tasks > /tmp/process.log &" >> startup.sh
RUN echo "/usr/bin/python manage.py runserver 0.0.0.0:8000" >> startup.sh
# run the created .sh file
RUN chmod +x startup.sh
EXPOSE 8000
CMD ./startup.sh

We're now working on a version with the postgresql db.
If you want to keep in touch with us please write at info@lab61.org

thank you for your work

@hpiedcoq
Copy link

Nice! Thanks for sharing this!

@sowdust
Copy link
Owner Author

sowdust commented Sep 30, 2020

Thank you very much, I have added the script dockerfile to the installation instructions.

@MidalaNet
Copy link

MidalaNet commented Oct 6, 2020

Here lab61, again.
In order to redirect all logs to stdout:

FROM tiagopeixoto/graph-tool:latest
RUN yes | pacman -S python-cairo
RUN yes | pacman -S python-pip
RUN yes | pacman -S git
RUN yes | pacman -S sqlite
RUN pip install virtualenv
RUN mkdir /app
WORKDIR /app
RUN git clone https://github.com/sowdust/tafferugli.git
WORKDIR tafferugli
RUN virtualenv --system-site-packages -p python3 env
RUN source env/bin/activate
RUN pip install -r requirements.txt
RUN python manage.py makemigrations
RUN python manage.py makemigrations twitter
RUN python manage.py migrate
# creating user with admin pass credentials
RUN echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'pass')" | python manage.py shell
# creating a file to startup the application
RUN echo "#!/bin/bash" > startup.sh
- RUN echo "nohup /usr/bin/python manage.py process_tasks > /tmp/process.log &" >> startup.sh
+ RUN echo "/usr/bin/python manage.py process_tasks &" >> startup.sh
RUN echo "/usr/bin/python manage.py runserver 0.0.0.0:8000" >> startup.sh
# run the created .sh file
RUN chmod +x startup.sh
EXPOSE 8000
CMD ./startup.sh

@sowdust
Copy link
Owner Author

sowdust commented Oct 7, 2020

Tnx! f41fe85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants