docker/etc | ||
Dockerfile | ||
README.md |
Prepare environment
- Download or build Docker images for:
- PostgreSQL
- RabbitMQ
- Setup PostgreSQL
docker exec -it postgres createuser -P pandora
docker exec postgres createdb -O pandora pandora
echo "CREATE EXTENSION pg_trgm;" | docker exec -i postgres psql pandora
- Setup RabbitMQ
docker exec rabbitmq rabbitmqctl add_user pandora RABBITMQ_PWD
docker exec rabbitmq rabbitmqctl add_vhost /pandora
docker exec rabbitmq rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
Configure Pan.do/ra
- Build Pan.do/ra Docker image
docker build -t pandora https://gitlab.dasm.cz:8443/Disassembler/pandora-alpine.git
- Create empty data directory for persistent storage
mkdir -p /srv/pandora/data
- Create file
/srv/pandora/local_settings.py
with the following content:
DATABASES = {
'default': {
'HOST': 'postgres',
'NAME': 'pandora',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': 'pandora',
'PASSWORD': 'POSTGRES_PWD',
}
}
BROKER_URL = 'amqp://pandora:RABBITMQ_PWD@rabbitmq:5672//pandora'
DB_GIN_TRGM = True
XACCELREDIRECT = True
Supply the POSTGRES_PWD
and RABBITMQ_PWD
according to your values.
- Populate database
docker run \
--link postgres \
-v /srv/pandora/local_settings.py:/srv/pandora/pandora/local_settings.py \
pandora \
/srv/pandora/pandora/manage.py init_db
- Start Pan.do/ra Docker image
docker run -it --rm \
--name pandora \
--link postgres \
--link rabbitmq \
-p 2620:80 \
-v /srv/pandora/data:/srv/pandora/data \
-v /srv/pandora/local_settings.py:/srv/pandora/pandora/local_settings.py \
pandora
- Open Pan.do/ra on http://your-machine:2620/
Updating
- Rebuild Pan.do/ra Docker image
docker build -t pandora https://gitlab.dasm.cz:8443/Disassembler/pandora-alpine.git
- Update database
docker run \
--link postgres \
-v /srv/pandora/local_settings.py:/srv/pandora/pandora/local_settings.py \
pandora \
/srv/pandora/update.py db