diff --git a/.github/workflows/quick_start.yml b/.github/workflows/quick_start.yml index da462def..dab48bdd 100644 --- a/.github/workflows/quick_start.yml +++ b/.github/workflows/quick_start.yml @@ -11,8 +11,6 @@ jobs: run: wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/feature/merge-docker-composes/docker-compose.yml - name: Start docker containers run: docker compose up -d --no-build - - name: Wait until DB container starts - run: sleep 10 - name: Load fixtures run: docker compose exec -T web src/manage.py loaddata demodata - name: Create superuser diff --git a/docker-compose.yml b/docker-compose.yml index 4bcc595c..02737699 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,8 @@ services: db: image: postgres:12-alpine environment: - - POSTGRES_HOST_AUTH_METHOD=trust - volumes: - - ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql -# - db:/var/lib/postgresql/data + - POSTGRES_USER=objecttypes + - POSTGRES_PASSWORD=objecttypes command: postgres -c max_connections=300 -c log_min_messages=LOG redis: @@ -17,6 +15,8 @@ services: image: maykinmedia/objecttypes-api:latest build: . environment: &app-env + - DB_USER=objecttypes + - DB_PASSWORD=objecttypes - DJANGO_SETTINGS_MODULE=objecttypes.conf.docker - SECRET_KEY=${SECRET_KEY:-fgv=c0hz&tl*8*3m3893@m+1pstrvidc9e^5@fpspmg%cyf15d} - ALLOWED_HOSTS=* diff --git a/docker-init-db.sql b/docker-init-db.sql deleted file mode 100644 index 7e5eb4df..00000000 --- a/docker-init-db.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE USER objecttypes; -CREATE DATABASE objecttypes; -GRANT ALL PRIVILEGES ON DATABASE objecttypes TO objecttypes;