From 36b433e2b6a291bdd1212b527a887fc1f65bc98a Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 14:04:03 +0100 Subject: [PATCH 1/9] ci: enable mypy strict mode --- api/pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/pyproject.toml b/api/pyproject.toml index bd1b59de..9e87c883 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -54,9 +54,8 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.mypy] - plugins = ["pydantic.mypy"] -# strict = true +strict = true exclude = ["/tests/"] ignore_missing_imports = true namespace_packages = true From b34e298e2caed8cade871566fab14b1cc85efc30 Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 14:04:17 +0100 Subject: [PATCH 2/9] chore: remove unused interrogate config --- api/pyproject.toml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/api/pyproject.toml b/api/pyproject.toml index 9e87c883..e74dfc4f 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -28,27 +28,6 @@ mongomock = "^4.1.2" mypy = "^1.14.1" types-cachetools = "^5.5.0.20240820" -[tool.interrogate] -ignore-init-method = true -ignore-init-module = true -ignore-magic = false -ignore-semiprivate = false -ignore-private = false -ignore-property-decorators = false -ignore-module = false -ignore-nested-functions = false -ignore-nested-classes = true -ignore-setters = false -fail-under = 0 -exclude = ["setup.py", "docs", "build"] -ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"] -# possible values: 0 (minimal output), 1 (-v), 2 (-vv) -verbose = 0 -quiet = false -whitelist-regex = [] -color = true -omit-covered-files = false - [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" @@ -62,9 +41,7 @@ namespace_packages = true explicit_package_bases = true allow_subclassing_any = true - [tool.ruff] - src = ["src"] target-version = "py312" line-length = 119 From 553f9e70905a32fee47bb90dfa47801c4db6cbb3 Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:33:45 +0100 Subject: [PATCH 3/9] refactor: run unit tests outside of docker --- .github/workflows/tests.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3abb3c1d..dcc9ac75 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,19 +18,24 @@ env: jobs: api-unit-tests: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./api steps: - - uses: actions/checkout@v4 + - name: "Setup: checkout repository" + uses: actions/checkout@v4 - - name: Login to image registry - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin + - name: "Setup: install poetry" + run: pipx install poetry - - name: Build API image - run: | - docker pull $API_IMAGE - docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE + - name: "Setup: add python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "poetry" - - name: Pytest Unit tests - run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api pytest --unit + - name: "Run: pytest unit tests" + run: poetry run pytest --unit api-integration-tests: runs-on: ubuntu-latest From bc596857dff300a2c95bfee5b83f3ec4da97ec3b Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:39:33 +0100 Subject: [PATCH 4/9] refactor: remove codespell --- .github/workflows/on-push-main-branch.yaml | 1 + .pre-commit-config.yaml | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/on-push-main-branch.yaml b/.github/workflows/on-push-main-branch.yaml index 64ec8986..e05d0fe4 100644 --- a/.github/workflows/on-push-main-branch.yaml +++ b/.github/workflows/on-push-main-branch.yaml @@ -20,6 +20,7 @@ jobs: needs: tests name: "Generate changelog" uses: ./.github/workflows/generate-changelog.yaml + docs: needs: generate-changelog name: "Build and publish docs" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f5d37e7..daab6115 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,16 +68,3 @@ repos: name: "Lint : biome (ts/js)" additional_dependencies: ["@biomejs/biome@1.9.4"] args: ["--config-path", "web"] - - - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 - hooks: - - id: codespell - name: "Lint : spelling" - description: Checks for common misspellings in text files. - entry: codespell --toml=api/pyproject.toml - exclude: documentation/docs/changelog/changelog.md - language: python - types: [text] - additional_dependencies: - - tomli From df3d7937a943a7431e879cd060b13aff3a798d4e Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 17:21:32 +0100 Subject: [PATCH 5/9] chore: remove labeler --- .github/labels.yml | 105 -------------------------- .github/workflows/label-importer.yaml | 22 ------ 2 files changed, 127 deletions(-) delete mode 100644 .github/labels.yml delete mode 100644 .github/workflows/label-importer.yaml diff --git a/.github/labels.yml b/.github/labels.yml deleted file mode 100644 index 2322961b..00000000 --- a/.github/labels.yml +++ /dev/null @@ -1,105 +0,0 @@ -## more info https://github.com/crazy-max/ghaction-github-labeler -- # maintenance - name: "type: :wrench: maintenance" - color: "" - description: "" -- # bug - name: "type: :bug: bug" - color: "FBCA04" - description: "" -- # documentation - name: "type: :memo: documentation" - color: "FBCA04" - description: "" -- # duplicate - name: "status: :busts_in_silhouette: duplicate" - color: "cccccc" - description: "" -- # enhancement - name: "type: :sparkles: enhancement" - color: "FBCA04" - description: "" -- # feature request - name: "type: :bulb: feature request" - color: "FBCA04" - description: "" -- # need feedback - name: "status: :mega: need feedback" - color: "cccccc" - description: "" -- # future maybe - name: ":rocket: future maybe" - color: "fef2c0" - description: "" -- # good first issue - name: ":hatching_chick: good first issue" - color: "7057ff" - description: "" -- # help wanted - name: "status: :pray: help wanted" - color: "cccccc" - description: "" -- # invalid - name: "status: :no_entry_sign: invalid" - color: "cccccc" - description: "" -- # investigate - name: "type: :mag: investigate" - color: "FBCA04" - description: "" -- # needs more info - name: "status: :thinking: needs more info" - color: "cccccc" - description: "" -- # question - name: "type: :question: question" - color: "FBCA04" - description: "" -- # won't do/fix - name: "status: :coffin: won't do/fix" - color: "cccccc" - description: "" -- # security - name: "type: :lock: security" - description: "" - color: "B60205" -- # on hold - name: "status: :zzz: on hold" - description: "" - color: "cccccc" -- # discussion - name: "type: :speech_balloon: discussion" - description: "" - color: "FBCA04" -- # blocked - name: "status: :scream_cat: blocked" - description: "" - color: "cccccc" -- # confirmed - name: "status: :writing_hand: confirmed" - description: "" - color: "93D8B2" -- # refactor - name: "type: :neckbeard: refactor" - description: "" - color: "FBCA04" -- # build - name: "type: :hammer: build" - description: "" - color: "FBCA04" -- # ci - name: "type: :ship: ci" - description: "" - color: "FBCA04" -- # test - name: "type: :traffic_light: test" - description: "" - color: "FBCA04" -- # chore - name: "type: :construction: chore" - description: "" - color: "FBCA04" -- # perf - name: "type: :speedboat: perf" - description: "" - color: "FBCA04" diff --git a/.github/workflows/label-importer.yaml b/.github/workflows/label-importer.yaml deleted file mode 100644 index 6df282f4..00000000 --- a/.github/workflows/label-importer.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Github Label Importer - -on: - workflow_dispatch: - -jobs: - labeler: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run Labeler - uses: crazy-max/ghaction-github-labeler@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - yaml-file: .github/labels.yml - skip-delete: false - dry-run: false - exclude: | - help* - *issue From ebb1bb51ca154d8468a3b4daaf09cd967f7bc702 Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Tue, 25 Feb 2025 17:22:33 +0100 Subject: [PATCH 6/9] refactor: use docker login action --- .github/workflows/publish-image.yaml | 17 ++++++++++++----- .github/workflows/tests.yaml | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index fa5389c5..06c16497 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -14,7 +14,6 @@ on: env: IMAGE_REGISTRY: ghcr.io - REGISTRY_USER: $GITHUB_ACTOR API_IMAGE: ghcr.io/equinor/template-fastapi-react/api NGINX_IMAGE: ghcr.io/equinor/template-fastapi-react/nginx @@ -26,8 +25,12 @@ jobs: with: fetch-depth: 2 - - name: "Login to image registry" - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: "Build web" run: | @@ -60,8 +63,12 @@ jobs: with: fetch-depth: 2 - - name: "Login to image registry" - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: "Build API" run: | diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index dcc9ac75..1d657f9f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,7 +11,6 @@ on: env: IMAGE_REGISTRY: ghcr.io - REGISTRY_USER: $GITHUB_ACTOR API_IMAGE: ghcr.io/equinor/template-fastapi-react/api WEB_IMAGE: ghcr.io/equinor/template-fastapi-react/web @@ -42,8 +41,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Login to image registry - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build API image run: | @@ -62,8 +65,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Login to image registry - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $IMAGE_REGISTRY -u $GITHUB_ACTOR --password-stdin + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build Web Image run: | From 2024a88adc9a4eedaa4fa9422850bb1800d4c3ed Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Wed, 26 Feb 2025 09:20:56 +0100 Subject: [PATCH 7/9] refactor: move platform flag to compose --- api/Dockerfile | 6 +++--- docker-compose.override.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index f85e5196..5c6da76b 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 python:3.13-slim AS base +FROM python:3.13-slim AS base WORKDIR /code CMD ["/code/src/init.sh", "api"] EXPOSE 5000 @@ -7,8 +7,8 @@ ENV PYTHONUNBUFFERED=1 ENV PYTHONPATH=/code RUN pip install --upgrade pip && \ - pip install poetry && \ - poetry config virtualenvs.create false + pip install poetry && \ + poetry config virtualenvs.create false COPY pyproject.toml pyproject.toml COPY poetry.lock poetry.lock diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 2f0d6dd0..f1db4085 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,9 +1,9 @@ services: - api: build: target: development image: template-api-dev + platform: linux/amd64 volumes: - ./api/src/:/code/src env_file: From 2694d110be20c383295109ee7a708ddbe36ab04a Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:49:13 +0100 Subject: [PATCH 8/9] refactor: use docker build action --- .github/workflows/tests.yaml | 45 +++++++++++++++++++++++------------- docker-compose.ci.yml | 3 ++- docker-compose.override.yml | 2 +- docker-compose.yml | 4 +++- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1d657f9f..ef7b16e4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -10,9 +10,9 @@ on: required: false env: - IMAGE_REGISTRY: ghcr.io - API_IMAGE: ghcr.io/equinor/template-fastapi-react/api - WEB_IMAGE: ghcr.io/equinor/template-fastapi-react/web + REGISTRY: ghcr.io + API_IMAGE_PATH: ${{ github.repository }}/api + WEB_IMAGE_PATH: ${{ github.repository }}/web jobs: api-unit-tests: @@ -39,27 +39,40 @@ jobs: api-integration-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: "Setup: checkout repository" + uses: actions/checkout@v4 - - name: "Login to GitHub Container Registry" + - name: "Setup: Login to GitHub Container Registry" uses: docker/login-action@v3 with: - registry: ${{ env.IMAGE_REGISTRY }} + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build API image - run: | - docker pull $API_IMAGE - docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE + # - name: "Setup: Docker Buildx" + # uses: docker/setup-buildx-action@v3 + # + # - name: "Setup: Build API image" + # uses: docker/build-push-action@v6 + # with: + # context: ./api + # target: development + # load: true + # tags: ${{ env.REGISTRY }}/${{ env.API_IMAGE_PATH }}:buildcache + # cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.API_IMAGE_PATH }}:buildcache + + # - name: Build API image + # run: | + # docker pull $API_IMAGE + # docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE + + - name: Pytest Integration tests + run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api python -m pytest --integration - name: BDD Integration tests if: ${{ false }} # disable for now run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run api behave - - name: Pytest Integration tests - run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api pytest --integration - web-tests: runs-on: ubuntu-latest steps: @@ -68,14 +81,14 @@ jobs: - name: "Login to GitHub Container Registry" uses: docker/login-action@v3 with: - registry: ${{ env.IMAGE_REGISTRY }} + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build Web Image run: | - docker pull $WEB_IMAGE - docker build --cache-from $WEB_IMAGE --target development --tag web-dev ./web + docker pull ${REGISTRY}/${WEB_IMAGE_PATH} + docker build --cache-from ${REGISTRY}/${WEB_IMAGE_PATH} --target development --tag web-dev ./web - name: Run Web tests if: ${{ false }} # disable for now as they do not currently work diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 8364f2fb..ee82e709 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -1,6 +1,7 @@ services: api: - image: development + image: ghcr.io/equinor/template-fastapi-react/api:latest + # image: api-development build: target: development environment: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index f1db4085..3465cb33 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,8 +1,8 @@ services: api: + image: template-api-dev build: target: development - image: template-api-dev platform: linux/amd64 volumes: - ./api/src/:/code/src diff --git a/docker-compose.yml b/docker-compose.yml index 35cd195f..932642da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,9 @@ services: api: image: ghcr.io/equinor/template-fastapi-react/api - build: ./api + build: + target: prod + context: ./api restart: unless-stopped depends_on: - db From 3088fcd5a810444dcd3324cef4d46213bb7fa045 Mon Sep 17 00:00:00 2001 From: Marius Lie Winger <89073985+mariuswinger@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:07:27 +0100 Subject: [PATCH 9/9] ci: test --- .github/workflows/tests.yaml | 83 ++++++++++++++++++------------------ docker-compose.ci.yml | 10 +++-- 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ef7b16e4..e6b8aed9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,8 +11,7 @@ on: env: REGISTRY: ghcr.io - API_IMAGE_PATH: ${{ github.repository }}/api - WEB_IMAGE_PATH: ${{ github.repository }}/web + API_IMAGE_NAME: api jobs: api-unit-tests: @@ -42,6 +41,9 @@ jobs: - name: "Setup: checkout repository" uses: actions/checkout@v4 + - name: "Setup: Set image name" + run: echo "API_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.API_IMAGE_NAME }}" >> "$GITHUB_ENV" + - name: "Setup: Login to GitHub Container Registry" uses: docker/login-action@v3 with: @@ -51,56 +53,51 @@ jobs: # - name: "Setup: Docker Buildx" # uses: docker/setup-buildx-action@v3 - # - # - name: "Setup: Build API image" - # uses: docker/build-push-action@v6 - # with: - # context: ./api - # target: development - # load: true - # tags: ${{ env.REGISTRY }}/${{ env.API_IMAGE_PATH }}:buildcache - # cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.API_IMAGE_PATH }}:buildcache - - # - name: Build API image - # run: | - # docker pull $API_IMAGE - # docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE - - - name: Pytest Integration tests + + - name: "Setup: Build API image" + uses: docker/build-push-action@v6 + with: + context: ./api + target: development + load: true + tags: ${{ env.API_IMAGE }}:dev + cache-from: type=registry,ref=${{ env.API_IMAGE }}:dev + # cache-to: type=registry,ref=${{ env.API_IMAGE }}:dev,mode=max + + - name: "Run: Integration tests (pytest)" run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api python -m pytest --integration - - name: BDD Integration tests + - name: "Run: Integration tests (behave)" if: ${{ false }} # disable for now run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run api behave web-tests: runs-on: ubuntu-latest + if: ${{ false }} # disable for now as they do not currently work steps: - - uses: actions/checkout@v4 + - name: "Setup: checkout repository" + uses: actions/checkout@v4 - - name: "Login to GitHub Container Registry" - uses: docker/login-action@v3 + - name: "Setup: Build web image" + uses: docker/build-push-action@v6 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Web Image - run: | - docker pull ${REGISTRY}/${WEB_IMAGE_PATH} - docker build --cache-from ${REGISTRY}/${WEB_IMAGE_PATH} --target development --tag web-dev ./web + context: ./web + target: development + load: true + tags: web:dev - - name: Run Web tests - if: ${{ false }} # disable for now as they do not currently work + - name: "Run: Web tests" run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm web yarn test docs-tests: name: test-docs runs-on: ubuntu-latest - + defaults: + run: + working-directory: ./documentation steps: # If you know your docs does not rely on anything outside of the documentation folder, the commented out code below can be used to only test the docs build if the documentation folder changes. - - name: Checkout GitHub Action + - name: "Setup: checkout repository" uses: actions/checkout@v4 # with: # fetch-depth: 0 @@ -110,17 +107,21 @@ jobs: # shell: bash # run: echo "changes=$(git diff --name-only $(git merge-base HEAD origin/main) HEAD | grep documentation/ | wc -l)" >> $GITHUB_OUTPUT - - name: Setup node + - name: "Setup: node" + if: ${{ false }} # if: steps.docs-changes.outputs.changes > 0 + id: setup-node uses: actions/setup-node@v4 with: node-version: 20 cache: yarn cache-dependency-path: documentation/yarn.lock - - name: Install dependencies and build website - # if: steps.docs-changes.outputs.changes > 0 - run: | - cd documentation - yarn install --frozen-lockfile - yarn build + - name: "Setup: Install dependencies" + id: install-deps + if: steps.setup-node.outcome == 'success' + run: yarn install --frozen-lockfile + + - name: "Run: Build docs" + if: steps.install-deps.outcome == 'success' + run: yarn build diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index ee82e709..ad0918c5 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -1,7 +1,6 @@ services: api: - image: ghcr.io/equinor/template-fastapi-react/api:latest - # image: api-development + image: ghcr.io/equinor/template-fastapi-react/api:dev build: target: development environment: @@ -13,11 +12,14 @@ services: MONGODB_PORT: 27017 SECRET_KEY: sg9aeUM5i1JO4gNN8fQadokJa3_gXQMLBjSGGYcfscs= AUTH_ENABLED: "False" - depends_on: - - db links: - db + nginx: + image: web:dev + build: + target: development + db: environment: MONGO_INITDB_ROOT_USERNAME: root