From 696db6971639b03bcd0c404fa84cfcca722dbcf6 Mon Sep 17 00:00:00 2001 From: Anna Shamray Date: Fri, 31 May 2024 17:08:13 +0200 Subject: [PATCH] :fire: [#408] remove docker-compose-quickstart --- .github/workflows/quick-start.yml | 14 +++++--------- docker-compose-quickstart.yml | 19 ------------------- docker-compose.yml | 9 ++++----- 3 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 docker-compose-quickstart.yml diff --git a/.github/workflows/quick-start.yml b/.github/workflows/quick-start.yml index e3cf9353..40aa0baa 100644 --- a/.github/workflows/quick-start.yml +++ b/.github/workflows/quick-start.yml @@ -6,19 +6,15 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - name: Download docker-compose file - run: wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml - - name: Overwrite the docker-compose file to get the "current" one - run: cp docker-compose-quickstart.yml docker-compose-qs.yml + # todo replace branch name with master after the change is merge + run: wget https://raw.githubusercontent.com/maykinmedia/objects-api/feature/merge-docker-composes/docker-compose.yml - name: Start docker containers - run: docker-compose -f docker-compose-qs.yml up -d - - name: Wait until DB container starts - run: sleep 10 + run: docker compose up -d --no-build - name: Load fixtures - run: docker-compose -f docker-compose-qs.yml exec -T web src/manage.py loaddata demodata + run: docker compose exec -T web src/manage.py loaddata demodata - name: Create superuser - run: docker-compose -f docker-compose-qs.yml exec -T web src/manage.py createsuperuser --username admin --email admin@admin.nl --no-input + run: docker compose exec -T web src/manage.py createsuperuser --username admin --email admin@admin.nl --no-input - name: Check main page run: | curl_status=$(curl -w '%{http_code}' -o /dev/null -s http://localhost:8000/) diff --git a/docker-compose-quickstart.yml b/docker-compose-quickstart.yml deleted file mode 100644 index 059ef151..00000000 --- a/docker-compose-quickstart.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3' - -services: - db: - image: postgis/postgis:12-2.5 - environment: - - POSTGRES_USER=${DB_USER:-objects} - - POSTGRES_PASSWORD=${DB_PASSWORD:-objects} - - web: - image: maykinmedia/objects-api:latest - environment: - - DJANGO_SETTINGS_MODULE=objects.conf.docker - - SECRET_KEY=${SECRET_KEY:-1(@f(-6s_u(5fd&1sg^uvu2s(c-9sapw)1era8q&)g)h@cwxxg} - - ALLOWED_HOSTS=* - ports: - - 8000:8000 - depends_on: - - db diff --git a/docker-compose.yml b/docker-compose.yml index 16a6df45..539d6d9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3' - services: db: # NOTE: No persistance storage configured. @@ -14,14 +12,12 @@ services: command: ["redis-server", "--appendonly", "yes"] web: + image: maykinmedia/objects-api:latest build: &web_build context: . environment: &web_env - DJANGO_SETTINGS_MODULE=objects.conf.docker - SECRET_KEY=${SECRET_KEY:-1(@f(-6s_u(5fd&1sg^uvu2s(c-9sapw)1era8q&)g)h@cwxxg} - - OBJECTS_SUPERUSER_USERNAME=admin - - OBJECTS_SUPERUSER_PASSWORD=admin - - OBJECTS_SUPERUSER_EMAIL=admin@localhost - IS_HTTPS=no - ALLOWED_HOSTS=* - CACHE_DEFAULT=redis:6379/0 @@ -48,6 +44,7 @@ services: - media:/app/media # Shared media volume to get access to saved OAS files web-init: + image: maykinmedia/objects-api:latest build: *web_build environment: *web_env command: /setup_configuration.sh @@ -57,6 +54,7 @@ services: volumes: *web_volumes celery: + image: maykinmedia/objects-api:latest build: *web_build environment: *web_env command: /celery_worker.sh @@ -66,6 +64,7 @@ services: volumes: *web_volumes celery-flower: + image: maykinmedia/objects-api:latest build: *web_build environment: *web_env command: /celery_flower.sh