Skip to content

Commit

Permalink
fix: vault renaming in docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
phette23 committed Feb 7, 2024
1 parent 8eff721 commit 4dd51e0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .invenio
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ logfile = /logs/invenio-cli.log
[cookiecutter]
project_name = CCA InvenioRDM
project_shortname = invenio
package_name = cca_inveniordm
project_site = archive.cca.edu
github_repo = cca/cca_invenio
description = CCA InvenioRDM Instance
Expand All @@ -17,6 +18,7 @@ search = opensearch2
file_storage = local
development_tools = yes
site_code = yes
use_reduced_vocabs = no
_template = https://github.com/inveniosoftware/cookiecutter-invenio-rdm.git

[files]
Expand Down
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Dockerfile that builds a fully functional image of your app.
#
# This image installs all Python dependencies for your application. It's based
# on AlmaLinux with Python 3 (https://github.com/inveniosoftware/docker-invenio)
# on Almalinux (https://github.com/inveniosoftware/docker-invenio)
# and includes Pip, Pipenv, Node.js, NPM and some few standard libraries
# Invenio usually needs.
#
# TODO https://vsupalov.com/buildkit-cache-mount-dockerfile/
# Note: It is important to keep the commands in this file in sync with your
# bootstrap script located in ./scripts/bootstrap.

FROM registry.cern.ch/inveniosoftware/almalinux:1

COPY site ./site
COPY Pipfile Pipfile.lock ./
ENV PIPENV_CACHE_DIR /root/.cache/pipenv
RUN mkdir -p ${PIPENV_CACHE_DIR}
Expand All @@ -18,13 +20,12 @@ COPY ./docker/uwsgi/ ${INVENIO_INSTANCE_PATH}
COPY ./invenio.cfg ${INVENIO_INSTANCE_PATH}
COPY ./templates/ ${INVENIO_INSTANCE_PATH}/templates/
COPY ./app_data/ ${INVENIO_INSTANCE_PATH}/app_data/
COPY ./translations/ ${INVENIO_INSTANCE_PATH}/translations/
COPY ./ .

RUN cp -r ./static/. ${INVENIO_INSTANCE_PATH}/static/
RUN cp -r ./assets/. ${INVENIO_INSTANCE_PATH}/assets/
RUN invenio collect
RUN invenio webpack create
RUN invenio webpack install --unsafe
RUN invenio webpack build
RUN cp -r ./static/. ${INVENIO_INSTANCE_PATH}/static/ && \
cp -r ./assets/. ${INVENIO_INSTANCE_PATH}/assets/ && \
invenio collect --verbose && \
invenio webpack buildall

ENTRYPOINT [ "bash", "-c"]
8 changes: 4 additions & 4 deletions docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ services:
file: docker-services.yml
service: app
command: ["uwsgi /opt/invenio/var/instance/uwsgi_ui.ini"]
image: invenio-vault:latest
image: invenio:latest
ports:
- "5000"
volumes:
Expand All @@ -81,7 +81,7 @@ services:
file: docker-services.yml
service: app
command: ["uwsgi /opt/invenio/var/instance/uwsgi_rest.ini"]
image: invenio-vault:latest
image: invenio:latest
ports:
- "5000"
volumes:
Expand All @@ -93,8 +93,8 @@ services:
extends:
file: docker-services.yml
service: app
command: ["celery -A invenio_app.celery worker --loglevel=INFO"]
image: invenio-vault:latest
command: ["celery -A invenio_app.celery worker --beat --loglevel=INFO"]
image: invenio:latest
volumes:
- uploaded_data:/opt/invenio/var/instance/data
depends_on:
Expand Down
16 changes: 8 additions & 8 deletions docker-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: ./
args:
- ENVIRONMENT=DEV
image: invenio-vault
image: invenio
restart: "unless-stopped"
environment:
- "INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1"
Expand All @@ -16,12 +16,12 @@ services:
- "INVENIO_CELERY_RESULT_BACKEND=redis://cache:6379/2"
- "INVENIO_SEARCH_HOSTS=['search:9200']"
- "INVENIO_SECRET_KEY=CHANGE_ME"
- "INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://invenio-vault:invenio-vault@db/invenio-vault"
- "INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://invenio:invenio@db/invenio"
- "INVENIO_WSGI_PROXIES=2"
- "INVENIO_RATELIMIT_STORAGE_URL=redis://cache:6379/3"
frontend:
build: ./docker/nginx/
image: invenio-vault-frontend
image: invenio-frontend
restart: "unless-stopped"
ports:
- "80"
Expand All @@ -36,20 +36,20 @@ services:
image: postgres:12.4
restart: "unless-stopped"
environment:
- "POSTGRES_USER=invenio-vault"
- "POSTGRES_PASSWORD=invenio-vault"
- "POSTGRES_DB=invenio-vault"
- "POSTGRES_USER=invenio"
- "POSTGRES_PASSWORD=invenio"
- "POSTGRES_DB=invenio"
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4:5.2
image: dpage/pgadmin4:6
restart: "unless-stopped"
ports:
- "5050:80"
- "5051:443"
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "invenio-vault"
PGADMIN_DEFAULT_PASSWORD: "invenio"
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
mq:
Expand Down
8 changes: 3 additions & 5 deletions invenio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file was automatically generated by 'invenio-cli init'.
For the full list of settings and their values, see
https://inveniordm.docs.cern.ch/reference/configuration/.
"""
import idutils

from datetime import datetime
from flask_babelex import lazy_gettext as _

Expand Down Expand Up @@ -37,9 +37,7 @@ APP_ALLOWED_HOSTS = ["0.0.0.0", "localhost", "127.0.0.1"]
# See https://flask-sqlalchemy.palletsprojects.com/en/2.x/config/

# TODO: Set
SQLALCHEMY_DATABASE_URI = (
"postgresql+psycopg2://invenio-vault:invenio-vault@localhost/invenio-vault"
)
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://invenio:invenio@localhost/invenio"


# Invenio-App
Expand Down Expand Up @@ -219,7 +217,7 @@ OAISERVER_ID_PREFIX = "archive.cca.edu"
# Invenio-Search
# --------------

SEARCH_INDEX_PREFIX = "invenio-cca-"
SEARCH_INDEX_PREFIX = "invenio-"
# note: this doesn't seem to matter, is superceded by INVENIO_SEARCH_HOSTS env var in docker-services.yml
INVENIO_SEARCH_HOSTS = [{"host": "search", "port": 9200}]

Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ invenio-cli services setup --no-demo-data # sets up db, cache, search, task queu
invenio-cli run # runs the application
```

The services setup actually enqueues a many tasks rather than completing them synchronously, so the first time you `run` the app it will take a while before setup is complete.

See our "notes" folder for further documentation.

## Overview
Expand Down

0 comments on commit 4dd51e0

Please sign in to comment.