GitHub user NAJ8ry added a comment to the discussion: ModuleNotFoundError: No
module named 'psycopg2' during k8 installation
There is a simple answer if you are hosting it with docker-compose - using the
command option. Works a treat - my services is defined:
remeody_superset:
container_name: remeody_superset
image: apache/superset:4.1.2
environment:
- SUPERSET_CONFIG_PATH=/app/pythonpath/superset_config.py
- POSTGRES_DB=${REMEODY_SUPERSET_DB}
- POSTGRES_USER=${REMEODY_POSTGRES_USER}
- POSTGRES_PASSWORD=${REMEODY_POSTGRES_PASSWORD}
- POSTGRES_HOST=${REMEODY_POSTGRES_IP}
- REDIS_HOST=remeody_redis
- GUNICORN_CMD_ARGS="--timeout 300 --workers 2"
# NB. No inverted commas in mapbox key
- MAPBOX_API_KEY=pk.xxxxxx
ports:
- "8088:8088" # Superset default port
networks:
rem_net:
ipv4_address: ${REMEODY_SUPERSET}
depends_on:
remeody_postgres_open:
condition: service_healthy
remeody_redis:
condition: service_healthy
volumes:
- ./config/superset_config.py:/app/pythonpath/superset_config.py
command: >
sh -c "**pip install psycopg2-binary** &&
superset db upgrade &&
superset init &&
superset fab create-admin --username admin --firstname Superset
--lastname Admin --email [email protected] --password admin &&
gunicorn -b 0.0.0.0:8088 -w 2 --timeout 300
'superset.app:create_app()'"
GitHub link:
https://github.com/apache/superset/discussions/31431#discussioncomment-13233100
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]