diff --git a/.gitignore b/.gitignore index c2658d7..8d1603a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules/ +files/* +!files/.gitkeep diff --git a/backend-pictures b/backend-pictures index c877279..e64c198 160000 --- a/backend-pictures +++ b/backend-pictures @@ -1 +1 @@ -Subproject commit c8772790b252a9f5b8c19d6bb59bda76f8fd1b28 +Subproject commit e64c1988cc66fd4762e311c2da11e5aa5f261fce diff --git a/docker-compose.yml b/docker-compose.yml index 973b8bd..f936da7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,7 @@ services: - "5432:5432" # Close this for production networks: - pgnet + nats: image: nats:latest ports: # Close these for production @@ -49,6 +50,19 @@ services: networks: - redisnet + minio: + image: minio/minio:latest + environment: + - MINIO_ACCESS_KEY=MINIO_ID + - MINIO_SECRET_KEY=MINIO_KEY + ports: + - "9000:9000" + volumes: + - ./files:/export + command: minio server /export + networks: + - minionet + core: build: ./backend-core tty: true @@ -119,6 +133,24 @@ services: networks: - authnet + pictures: + build: ./backend-pictures + tty: true + restart: unless-stopped + depends_on: + - minio + - traefik + environment: + - LISTEN=:80 + - MINIO_ENDPOINT=minio:9000 + - MINIO_ID=MINIO_ID + - MINIO_KEY=MINIO_KEY + - MINIO_BUCKET_NAME=beep + - MINIO_LOCATION=us-east-1 + networks: + - traefiknet + - minionet + # Pipeline bite: build: ./backend-bite @@ -192,3 +224,4 @@ networks: natsnet: redisnet: traefiknet: + minionet: diff --git a/files/.gitkeep b/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/traefik.toml b/traefik.toml index 6ec518f..1222cf1 100644 --- a/traefik.toml +++ b/traefik.toml @@ -126,6 +126,22 @@ entrypoints = ["http", "https"] [frontends.transcription.routes.one] rule = "PathPrefixStrip: /transcription/" +# pictures +[backends.pictures] + [backends.pictures.servers.one] + url = "http://pictures" + +[frontends.pictures] +backend = "pictures" +entrypoints = ["http", "https"] + [frontends.pictures.headers.customresponseheaders] + Access-Control-Allow-Origin = "*" + Access-Control-Allow-Headers = "Content-Type, Authorization, X-User-Claim" + Access-Control-Allow-Credentials = "true" + Access-Control-Allow-Methods = "GET, HEAD, POST, PUT, PATCH, DELETE" + [frontends.pictures.routes.one] + rule = "PathPrefixStrip: /pictures/" + # login [backends.login] [backends.login.servers.one]