Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksi44/django-selenium-docker
Demo webapp with Selenium, Docker, Django, Postgresql, Celery, RabbitMQ, Django channels and Redis.
https://github.com/aleksi44/django-selenium-docker
celery django django-admin djangochannels docker docker-compose postgresql rabbitmq redis selenium selenium-python selenium-webdriver
Last synced: about 2 months ago
JSON representation
Demo webapp with Selenium, Docker, Django, Postgresql, Celery, RabbitMQ, Django channels and Redis.
- Host: GitHub
- URL: https://github.com/aleksi44/django-selenium-docker
- Owner: Aleksi44
- Created: 2021-07-17T13:41:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-17T16:07:09.000Z (over 3 years ago)
- Last Synced: 2023-03-05T07:38:29.459Z (almost 2 years ago)
- Topics: celery, django, django-admin, djangochannels, docker, docker-compose, postgresql, rabbitmq, redis, selenium, selenium-python, selenium-webdriver
- Language: Python
- Homepage: https://alexis-le-baron.com/en/django-selenium-docker/?ref=github
- Size: 76.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Selenium Docker
Here is a webapp that displays the Selenium window preview in a Django Admin.
![Selenium Docker preview](https://static.snoweb.fr/media/selenium-docker-github-readme.gif)
In this simple example, we display the urls of the following pages:
- https://www.facebook.com/
- https://www.linkedin.com/
- https://www.instagram.com/
- https://twitter.com/This minimalist webapp was designed to help you configure the Python ecosystem with Selenium.
The webapp uses the following services :
- [Selenium](https://github.com/SeleniumHQ/selenium)
- [Docker](https://www.docker.com/)
- [Django](https://github.com/django/django) (Webapp)
- [Postgresql](https://www.postgresql.org/) (Database)
- [Celery](https://github.com/celery/celery) (Task)
- [RabbitMQ](https://www.rabbitmq.com/) (Broker)
- [Django channels](https://github.com/django/channels) (Websocket)
- [Redis](https://redis.io/) (Channel layers)## Run the webapp
### Run with Docker
1 - Check and stop all the following services if they are running on your local machine :
service rabbitmq-server stop
service postgresql stop
service redis-server stop2 - And run :
docker-compose up
docker-compose exec -T app python manage.py on_start --settings=settings.production3 - Login with django:selenium at :
http://127.0.0.1:8001/
### Or run locally
1 - You need to run/install these services :
sudo service rabbitmq-server start
sudo service redis-server start
sudo service postgresql start2 - Then configure your database by following the Django settings.dev configuration :
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'app',
'USER': 'app_user',
'PASSWORD': 'changeme',
'HOST': 'localhost',
'PORT': '5432',
}
}3 - Then launch the webapp and the worker :
export DJANGO_SETTINGS_MODULE=settings.dev
pip install -r requirements.txt
python manage.py on_start --settings=settings.dev
python manage.py runserver 127.0.0.1:4243 -v 3 --settings=settings.dev
celery -A app.core worker -l info4 - Login with django:selenium at :
http://127.0.0.1:4243/