Skip to content

Commit

Permalink
Remove docker-compose-prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Oct 24, 2023
1 parent 98beee2 commit 180847c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 56 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ ifeq ("$(wildcard ${DC})","")
endif

check-dc-config-%: check-prerequisites ## Check docker-compose syntax
${DC} -f docker-compose-$*.yml config -q
${DC} -f docker-compose.yml config -q

build-%: check-dc-config-%
TAG=${TAG} ${DC} -f docker-compose-$*.yml build
build: check-dc-config-%
TAG=${TAG} ${DC} -f docker-compose.yml build

up-%: check-dc-config-%
up: check-dc-config-%
ifeq ("$(WORKSPACE)","preprod")
TAG=${TAG} PORT_PROD=8080 ${DC} -f docker-compose-$*.yml up -d
TAG=${TAG} PORT_PROD=8080 ${DC} -f docker-compose.yml up -d
else
TAG=${TAG} ${DC} -f docker-compose-$*.yml up -d
TAG=${TAG} ${DC} -f docker-compose.yml up -d
endif

down-%:
${DC} -f docker-compose-$*.yml down
down:
${DC} -f docker-compose.yml down

tag: show-current-tag
git tag -a v${TAG}
Expand Down
23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,16 @@ See also [Debugging](https://github.com/datalab-mi/Basegun/blob/develop/backend/

```bash
# install in dev mode
make build-dev

# install for prod/preprod
make build-prod
make build
```

### Launch the website
```bash
# run in dev mode
make up-dev

# run prod mode on localhost
WORKSPACE=preprod make up-prod

# run in prod
make up-prod
# run
make up

# stop in dev
make down-dev
# stop in prod/preprod
make down-prod
# stop
make down
```
## Debugging

Expand All @@ -68,7 +57,7 @@ Try to find error log
### The website runs the analysis, but no image shows up
Use browser html inspector to find the url given in the image src.
* If it starts with `https://storage.gra.cloud.ovh.net` then the website tried to upload the input image to OVH but it failed. Have you set properly in your env the variables OS_USERNAME, OS_PASSWORD and OS_PROJECT ?
* If it starts with `https://localhost` then the website tried to store the input image locally. Have you synchronised the mounts for frontend and backend in [docker-compose-dev](https://github.com/datalab-mi/Basegun/blob/develop/backend/docker-compose-dev.yml) ? (uncomment the `/tmp/basegun` lines in the volumes sections)
* If it starts with `https://localhost` then the website tried to store the input image locally. Have you synchronised the mounts for frontend and backend in [docker-compose](https://github.com/datalab-mi/Basegun/blob/develop/backend/docker-compose.yml) ? (uncomment the `/tmp/basegun` lines in the volumes sections)

### Logs are not sent to the endpoint
The variables `X_OVH_TOKEN` and `API_OVH_TOKEN` must en set in your env. See [Infra README](https://github.com/datalab-mi/Basegun/blob/develop/infra/README.md) for more details.
Expand Down
28 changes: 0 additions & 28 deletions docker-compose-prod.yml

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"preview": "vite preview",
"build": "vite build",
"compose:up": "docker compose -f ../docker-compose-dev.yml --profile backend-only up -d",
"compose:up": "docker compose -f ../docker-compose.yml --profile backend-only up -d",
"dev": "vite",
"lint": "eslint src",
"format": "eslint src --fix",
Expand Down
2 changes: 1 addition & 1 deletion infra/legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This folder stores various contents related to Basegun deployment.

1. Using Github actions, we trigger either the [*preprod* deployment](../../.github/workflows/develop.yml) or the [*prod* deployment](../../.github/workflows/release.yml).
2. For both of them, the [workflow calls Terraform](../.github/workflows/deploy.yml) using specific env variables to differentiate preprod from prod, to start a VM on OVH public cloud.
3. On the VM, we always have [3 containers](../docker-compose-prod.yml) :
3. On the VM, we always have [3 containers](../docker-compose.yml) :
* 1 for Basegun frontend (Vue.js website)
* 1 for Basegun backend (Python API)
* 1 for the log collector (Filebeat )
Expand Down
2 changes: 1 addition & 1 deletion infra/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Launch a cluster like the one in CI
kind delete cluster

TAG=$(make get-current-tag) BUILD_TARGET=test docker-compose -f docker-compose-prod.yml build
TAG=$(make get-current-tag) BUILD_TARGET=dev docker-compose -f docker-compose.yml build
kind create cluster --config ./infra/kube/kind/kind-config.yml

helm repo add traefik https://traefik.github.io/charts && helm repo update
Expand Down

0 comments on commit 180847c

Please sign in to comment.