Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove docker-compose-quickstart #409

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/quick-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
8 changes: 4 additions & 4 deletions README.NL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ Quickstart

.. code:: bash

$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose.yml
$ docker-compose -f docker-compose-qs.yml up -d
$ docker-compose exec web src/manage.py loaddata demodata
$ docker-compose exec web src/manage.py createsuperuser
$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose.yml
$ docker compose up -d --no-build
$ docker compose exec web src/manage.py loaddata demodata
$ docker compose exec web src/manage.py createsuperuser
annashamray marked this conversation as resolved.
Show resolved Hide resolved

2. In de browser, navigeer naar ``http://localhost:8000/`` om de admin en de
API te benaderen.
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ Quickstart

.. code:: bash

$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
$ docker-compose -f docker-compose-qs.yml up -d
$ docker-compose exec web src/manage.py loaddata demodata
$ docker-compose exec web src/manage.py createsuperuser
$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose.yml
$ docker compose up -d --no-build
$ docker compose exec web src/manage.py loaddata demodata
$ docker compose exec web src/manage.py createsuperuser

2. In the browser, navigate to ``http://localhost:8000/`` to access the admin
and the API.
Expand Down
19 changes: 0 additions & 19 deletions docker-compose-quickstart.yml

This file was deleted.

9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
db:
# NOTE: No persistance storage configured.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -57,6 +54,7 @@ services:
volumes: *web_volumes

celery:
image: maykinmedia/objects-api:latest
build: *web_build
environment: *web_env
command: /celery_worker.sh
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions docs/installation/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Quickstart
==========

A simple ``docker-compose-quickstart.yml`` file is available to get the APIs
A simple ``docker-compose.yml`` file is available to get the APIs
up and running in minutes. This file has some convenience settings to get
started quickly and these should never be used for anything besides testing:

Expand Down Expand Up @@ -31,31 +31,31 @@ Objecttypes API

.. code:: shell

$ wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
$ wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose.yml

.. tab:: Windows Powershell 3

.. code:: shell

PS> wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
PS> wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose.yml

3. Start the Docker containers:

.. code:: shell

$ docker-compose -f docker-compose-qs.yml up -d
$ docker compose up -d --no-build

4. Import a demo set of objecttypes:

.. code:: shell

$ docker-compose exec web src/manage.py loaddata demodata
$ docker compose exec web src/manage.py loaddata demodata

5. Create a superuser

.. code:: shell

$ docker-compose exec web src/manage.py createsuperuser
$ docker compose exec web src/manage.py createsuperuser


Objects API
Expand All @@ -76,32 +76,32 @@ Objects API

.. code:: shell

$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose.yml

.. tab:: Windows Powershell 3

.. code:: shell

PS> wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
PS> wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose.yml

3. Start the Docker containers:

.. code:: shell

$ docker-compose -f docker-compose-qs.yml up -d
$ docker compose -f docker-compose-qs.yml up -d --no-build

4. Import a demo set of objects (linking to the demo objecttypes):

.. code:: shell

$ docker-compose exec web src/manage.py loaddata demodata
$ docker compose exec web src/manage.py loaddata demodata


5. Create a superuser

.. code:: shell

$ docker-compose exec web src/manage.py createsuperuser
$ docker compose exec web src/manage.py createsuperuser


6. Retrieve an object via the Objects API in your webbrowser:
Expand Down
Loading