diff --git a/.circleci/config.yml b/.circleci/config.yml index 1bc1f26a..93f7aa5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: jobs: backend-build: machine: - image: ubuntu-2004:202201-02 + image: ubuntu-2404:2024.05.1 steps: - checkout # restore cache and docker layer cache diff --git a/Dockerfiles/circleci-env.yml b/Dockerfiles/circleci-env.yml index 39eb9a5c..130c891f 100644 --- a/Dockerfiles/circleci-env.yml +++ b/Dockerfiles/circleci-env.yml @@ -1,8 +1,7 @@ -version: '3.2' services: postgres: hostname: postgres - image: postgres:15 + image: postgres:16 ports: - 0.0.0.0:5432:5432 environment: diff --git a/Dockerfiles/dev-env.yml b/Dockerfiles/dev-env.yml index 9c78860f..523db88d 100644 --- a/Dockerfiles/dev-env.yml +++ b/Dockerfiles/dev-env.yml @@ -1,4 +1,3 @@ -version: '3.2' services: redis: image: redis @@ -12,14 +11,14 @@ services: - 0.0.0.0:5671:5671 - 0.0.0.0:5672:5672 postgres: - image: postgres:15 + image: postgres:16 environment: - POSTGRES_PASSWORD=password - POSTGRES_HOST_AUTH_METHOD=trust ports: - 0.0.0.0:5432:5432 volumes: - - ../.jarr-data-15:/var/lib/postgresql/data + - ../.jarr-data-16:/var/lib/postgresql/data command: - "postgres" - "-c" diff --git a/Makefile b/Makefile index 5f698255..372a1415 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SERVER_ADDR = 0.0.0.0 DB_VER = $(shell pipenv run flask db heads | tail -n1 | sed -e 's/ .*//g') COMPOSE_FILE ?= Dockerfiles/dev-env.yml RUN = FLASK_APP=wsgi PIPENV_IGNORE_VIRTUALENVS=1 pipenv run -COMPOSE = $(RUN) docker-compose --project-name jarr --file $(COMPOSE_FILE) +COMPOSE = $(RUN) docker compose --project-name jarr --file $(COMPOSE_FILE) TEST = tests/ DB_NAME ?= jarr PUBLIC_URL ?= @@ -67,10 +67,11 @@ run-front: db-bootstrap-user: $(COMPOSE) exec $(DB_CONTAINER_NAME) su postgres -c \ - "createuser $(DB_NAME) --no-superuser --createdb" + "createuser $(DB_NAME) --superuser --createdb" db-bootstrap-tables: $(COMPOSE) exec $(DB_CONTAINER_NAME) su postgres -c "createdb $(DB_NAME) --no-password" + $(COMPOSE) exec $(DB_CONTAINER_NAME) psql -h 0.0.0.0 -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE $(DB_NAME) to $(DB_NAME);" db-import-dump: docker cp $(DUMP) jarr_$(DB_CONTAINER_NAME)_1:/tmp/dump.pgsql