Ocelot-Social/docker-compose.test.yml
Robert Schäfer 00da9e8ecb
feat(backend): resize images with imagor (#8558)
* feat(backend): resize images with imagor

Open questions:
* Do we have external URLs for images? E.g. we have them for seeds. But
  in production?

* Do we want to apply image transformations on these as well? My current
implementation does not apply image transformations as of now. If we
want to do that, we will also expose internal URLs in the kubernetes
Cluster to the S3 endpoint to the client.

TODOs:
* The chat component is using a fixed size for all avatars at the moment.
Maybe we can pair-program on this how to implement responsive images in
this component library.

Commits:
* do not replace upload domain url in the database

* fix all webapp specs

* refactor: remove behaviour we won't need

We don't want to apply image transformations on files, right?

* refactor: replace the domain on read not on write

* wip: webapp fixes

* refactor(backend): add another url to config

I've given up. There seems to be no nice way to tell the minio to return
a location which differs from it's host name.

* refactor: add test for s3Service

* refactor(backend): proxy minio via backend in local development

Commits:
* provide tests for message attachments
* remove S3_PUBLIC_URL config value

* refactor: follow @ulfgebhardt's review

* add missing environment variable

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-08-19 10:11:12 +02:00

90 lines
2.8 KiB
YAML

services:
webapp:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: ghcr.io/ocelot-social-community/ocelot-social/webapp:test
build:
target: test
environment:
- NODE_ENV=test
volumes:
- ./coverage:/app/coverage
backend:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: ghcr.io/ocelot-social-community/ocelot-social/backend:test
depends_on:
- minio
- minio-mc
- mailserver
build:
target: test
environment:
- NODE_ENV="test"
- AWS_ACCESS_KEY_ID=minio
- AWS_SECRET_ACCESS_KEY=12341234
- AWS_ENDPOINT=http:/minio:9000
- AWS_REGION=local
- AWS_BUCKET=ocelot
- DEBUG=
- IMAGOR_PUBLIC_URL=http://localhost:8000
- IMAGOR_SECRET=mysecret
- PROXY_S3=http://minio:9000
volumes:
- ./coverage:/app/coverage
maintenance:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: ghcr.io/ocelot-social-community/ocelot-social/maintenance:test
neo4j:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: ghcr.io/ocelot-social-community/ocelot-social/neo4j:community
build:
context: ./neo4j
target: community
#environment:
# - NEO4J_dbms_connector_bolt_enabled=true
# - NEO4J_dbms_connector_bolt_tls__level=OPTIONAL
# - NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687
# - NEO4J_auth=none
# - NEO4J_dbms_connectors_default__listen__address=0.0.0.0
# - NEO4J_dbms_connector_http_listen__address=0.0.0.0:7474
# - NEO4J_dbms_connector_https_listen__address=0.0.0.0:7473
mailserver:
image: maildev/maildev
ports:
- 1080:1080
- 1025:1025
minio:
image: quay.io/minio/minio
ports:
- 9000:9000
- 9001:9001
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=12341234
command: server /data --console-address ":9001"
minio-mc:
image: quay.io/minio/mc
depends_on:
- minio
restart: on-failure
volumes:
- ./minio/readonly-policy.json:/tmp/readonly-policy.json
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc alias set dockerminio http://minio:9000 minio 12341234;
/usr/bin/mc mb --ignore-existing dockerminio/ocelot;
/usr/bin/mc anonymous set-json /tmp/readonly-policy.json dockerminio/ocelot;
"
volumes:
minio_data: