🔧 Added a flag to docker-compose

This commit is contained in:
2021-10-18 08:38:47 -07:00
parent a050a83724
commit 8b3743fe6b
2 changed files with 17 additions and 18 deletions

View File

@@ -12,6 +12,8 @@ services:
- "8050:8050" - "8050:8050"
- "3050:3050" - "3050:3050"
- "8051:8051" - "8051:8051"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on: depends_on:
- rabbitmq - rabbitmq
- db - db
@@ -30,6 +32,8 @@ services:
container_name: comicvine-api container_name: comicvine-api
ports: ports:
- "3080:3080" - "3080:3080"
extra_hosts:
- "host.docker.internal:host-gateway"
environment: environment:
SERVICES: api SERVICES: api
env_file: ./docker-env/comicvine-service.env env_file: ./docker-env/comicvine-service.env
@@ -46,6 +50,8 @@ services:
network: host network: host
image: frishi/comicvine-service image: frishi/comicvine-service
container_name: comicvine-service container_name: comicvine-service
extra_hosts:
- "host.docker.internal:host-gateway"
environment: environment:
SERVICES: comicvine SERVICES: comicvine
volumes: volumes:
@@ -60,6 +66,8 @@ services:
network: host network: host
image: frishi/threetwo-import-service image: frishi/threetwo-import-service
container_name: threetwo-import-api container_name: threetwo-import-api
extra_hosts:
- "host.docker.internal:host-gateway"
ports: ports:
- "3000:3000" - "3000:3000"
environment: environment:
@@ -80,6 +88,8 @@ services:
network: host network: host
image: frishi/threetwo-import-service image: frishi/threetwo-import-service
container_name: import container_name: import
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on: depends_on:
- db - db
- nats - nats
@@ -98,6 +108,8 @@ services:
network: host network: host
image: frishi/threetwo-import-service image: frishi/threetwo-import-service
container_name: image-transformation container_name: image-transformation
extra_hosts:
- "host.docker.internal:host-gateway"
volumes: volumes:
- ./userdata:/threetwo-import-service/userdata - ./userdata:/threetwo-import-service/userdata
- ./comics:/threetwo-import-service/comics - ./comics:/threetwo-import-service/comics
@@ -129,6 +141,8 @@ services:
nginx: nginx:
image: nginx image: nginx
container_name: reverse-proxy container_name: reverse-proxy
extra_hosts:
- "host.docker.internal:host-gateway"
ports: ports:
- "80:80" - "80:80"
volumes: volumes:

View File

@@ -1,22 +1,7 @@
server { server {
listen 8050; listen 8050;
location / { location / {
if ($request_method = 'OPTIONS') { proxy_pass http://host.docker.internal:8050;
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,
X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
add_header 'Content-Type' 'application/json';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,
X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
proxy_pass http://localhost:8050;
} }
} }
@@ -25,7 +10,7 @@ server {
listen 3080; listen 3080;
location /comicvine-service { location /comicvine-service {
proxy_pass http://localhost:3080; proxy_pass http://host.docker.internal:3080;
} }
} }
@@ -33,6 +18,6 @@ server {
listen 3000; listen 3000;
location /import { location /import {
proxy_pass http://localhost:3000; proxy_pass http://host.docker.internal:3000;
} }
} }