{"id":35619723,"url":"https://github.com/scieloorg/spf","last_synced_at":"2026-01-05T06:03:50.958Z","repository":{"id":43310742,"uuid":"377187749","full_name":"scieloorg/spf","owner":"scieloorg","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-07T06:54:39.000Z","size":350,"stargazers_count":0,"open_issues_count":38,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-07T07:34:34.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scieloorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-15T14:16:32.000Z","updated_at":"2021-12-29T16:50:29.000Z","dependencies_parsed_at":"2022-08-27T14:38:42.384Z","dependency_job_id":"e9ff7a1f-de44-450f-94c5-02d8238c1af3","html_url":"https://github.com/scieloorg/spf","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/scieloorg/spf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scieloorg%2Fspf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scieloorg%2Fspf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scieloorg%2Fspf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scieloorg%2Fspf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scieloorg","download_url":"https://codeload.github.com/scieloorg/spf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scieloorg%2Fspf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28214409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-05T02:00:06.358Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-05T06:02:30.971Z","updated_at":"2026-01-05T06:03:50.947Z","avatar_url":"https://github.com/scieloorg.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SciELO Publishing Framework\n\n## Development\n\n### Installation under a Python virtual environment\n\n__System dependencies__\n\n```shell\n# Be sure that you have the necessary operational system dependencies\ngettext\npython3\n```\n\n__Create a virtual environment and install the application dependencies__\n\n```shell\n# Create a virtual environment\nvirtualenv -p python3 .venv\n\n# Access the virtual environment\nsource .venv/bin/activate\n\n# Access the folder app\ncd app\n\n# Install dependencies\npip install -r requirements.txt\n\n# Install packages\npip install .\n```\n\n__Set the environment variables__\n\n```shell\n# Create a dotenv file (and add to it the necessary environment variables - see List of environment variables)\ntouch .env.dev\n\n# Export its contents to the system enviroment\nexport $(cat .env.dev | xargs)\n```\n\n__Create a PostgreSQL database named \"spf\"__\n\n```shell\n# Through a Docker container with a PostgreSQL database\ndocker exec --user postgres -it scl_postgres_1 psql -c 'create database spf;'\n\n# Or through psql\npsql --user postgres;\ncreate database spf;\n```\n\n__Run the Message Broker RabbitMQ__\n```shell\n# See https://www.rabbitmq.com/download.html to obtain more information\ndocker run -d -p 5672:5672 rabbitmq\n```\n\n__Prepare and run the application__\n\n```shell\n# Make migrations related to the database\npython manage.py makemigrations\n\n# Migrate database (this operation will create all the necessary tables)\npython manage.py migrate\n```\n\n__Add default groups to the application database__\n\n```shell\n# Add default groups to the application database\npython manage.py loaddata group\n```\n\n__Add example users to the application database (only in development environments)__\n\n```shell\n# Add example users to the application database\npython manage.py loaddata user\n```\n\n__Override superuser credentials__\npython manage.py createsuperuser\n\n__Run the application__\n\n```shell\n# Start Celery\ncelery -A spf worker -l INFO\n\n# Start the application\npython manage.py runserver\n```\n\n__How to translate the interface content to other languages__\n\n```shell\n# Access the core project directory\ncd core\n\n# Create the strings to be translated to Portuguese\npython ../manage.py make_messages_no_fuzzy -l pt\n\n# Create the strings to be translated to Spanish\npython ../manage.py make_messages_no_fuzzy -l es\n\n# Translate the strings\n\n# Compile the translated strings\npython ../manage.py compilemessages\n```\n\n\n---\n\n## Production\n\n### Installation under Docker\n\n```shell\n# Be sure you are in the project root directory. Executing `ls .` will list the following files/directories\napp\ndocker-compose.yml\nLICENSE\nnginx\nREADME.md\n```\n\n__Start a nginx container and copy nginx.conf to /etc/nginx/conf.d__\n\n__Start a postgres container and keep note of user credentials__\n\n__Create a dotenv file (and add to it the necessary environment variables - see List of environment variables)__\n\n```shell\ntouch .env.prod\n```\n\n__Build image and start the services__\n\n```shell\ndocker-compose -f docker-compose.yml up -d --build\n```\n\n__Migrate data__\n\n```shell\n# Under host shell, run\ndocker-compose -f docker-compose.yml exec web python manage.py migrate --noinput\n\n# Under docker shell, run\npython manage.py migrate\n```\n\n__Collect staticfiles__\n\n```shell\n# Under host shell, run\ndocker-compose -f docker-compose.yml exec web python manage.py collectstatic --no-input --clear\n\n# Under docker shell, run\npython manage.py collectstatic\n```\n\n__Generate translations__\n```bash\n# Under host shell, run\npython ../manage.py compilemessages\n\n# Under docker shell, run\ndocker-compose -f docker-compose.yml exec web python manage.py compilemessages\n```\n\n__Load default groups__\n\n```shell\n# Under host shell, run\ndocker-compose -f docker-compose.yml exec web python manage.py loaddata group\n\n# Under docker shell, run\npython manage.py loaddata group\n```\n\n__Load example users (recommended only for development environment)__\n\n```shell\n# Under host shell, run\ndocker-compose -f docker-compose.yml exec web python manage.py loaddata user\n\n# Under docker shell, run\npython manage.py loaddata user\n```\n\n__Make sure PostgreSQL and MongoDB databases are in the same network as the spf application__\n\n\n---\n\n## List of environment variables\n- BASES_PATH: Isis Bases root directory\n- BASES_PDF_PATH: Isis Base \"PDF\"\n- BASES_TRANSLATION_PATH: Isis Base \"Translation\"\n- BASES_WORK_PATH: Isis Base \"Work\"\n- BASES_XML_PATH: Isis Base \"XML\"\n- CISIS_PATH: CISIS root directory\n- HTDOCS_IMG_REVISTAS_PATH: HTDOCS Image directory\n- CELERY_BROKER_URL: RabbitMQ address (`pyamqp://user:pass@host:port`)\n- DATABASE_CONNECT_URL: OPAC/Kernel database (MongoDB) string connection (`mongodb://user:pass@host:port/opac`)\n- DJANGO_ALLOWED_HOSTS: `localhost;127.0.0.1;[::1]`\n- DJANGO_DEBUG: Django flag to see DEBUG messages (`1`)\n- DJANGO_SECRET_KEY: Django secret key\n- MINIO_ACCESS_KEY: MinIO username\n- MINIO_HOST: MinIO host address (`host:port`)\n- MINIO_SCIELO_COLLECTION: MinIO collection name\n- MINIO_SECRET_KEY: MinIO password\n- MINIO_SECURE: MinIO SSL flag (`true` or `false`)\n- MINIO_SPF_DIR: MinIO storage main directory\n- MINIO_TIMEOUT: MinIO connection timeout\n- PID_DATABASE_DSN: PID manager (PostgreSQL) string connection (`postgresql+psycopg2://postgres:password@host:port/database`)\n- POSTGRES_DB: SciELO Publishing Framework database name\n- POSTGRES_HOST: SciELO Publishing Framework database hostname\n- POSTGRES_PASSWORD: SciELO Publishing Framework database user password\n- POSTGRES_PORT: SciELO Publishing Framework database host port\n- POSTGRES_USER: SciELO Publishing Framework database user\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscieloorg%2Fspf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscieloorg%2Fspf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscieloorg%2Fspf/lists"}