🐳 Added import service config
This commit is contained in:
16
README.md
16
README.md
@@ -11,7 +11,17 @@ ThreeTwo! currently is set up as:
|
||||
3. `comicvine-service` [https://github.com/rishighan/comicvine-service]
|
||||
## Local Development
|
||||
|
||||
1. Clone this repo
|
||||
2. `yarn run dev` (you can ignore the warnings)
|
||||
3.
|
||||
The recommended approach is to simply use `docker-compose` which spins up containers for the UI and all the associated microservices and data store.
|
||||
To do that:
|
||||
|
||||
1. Clone this repo using `git clone https://github.com/rishighan/threetwo.git`
|
||||
2. Run `docker-compose up --build -d`
|
||||
3. Note that the first time, the process could take up to 10 minutes
|
||||
|
||||
However, for debugging and troubleshooting, you can run this app locally using these steps:
|
||||
|
||||
1. Clone this repo using `git clone https://github.com/rishighan/threetwo.git`
|
||||
2. `yarn run dev` (you can ignore the warnings)
|
||||
3. This will open `http://localhost:3050` in your default browser
|
||||
4. Note that this is simply the UI layer and won't offer anything beyond a scaffold. You have to spin up the microservices locally to get it to work.
|
||||
|
||||
|
||||
9
comicvine-service.env
Normal file
9
comicvine-service.env
Normal file
@@ -0,0 +1,9 @@
|
||||
NAMESPACE=
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=dist/services
|
||||
|
||||
TRANSPORTER=nats://nats:4222
|
||||
|
||||
CACHER=Memory
|
||||
|
||||
@@ -3,6 +3,7 @@ version: "3.7"
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
container_name: proxy
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
@@ -21,12 +22,14 @@ services:
|
||||
|
||||
comicvineapi:
|
||||
build:
|
||||
context: .
|
||||
context: https://github.com/rishighan/comicvine-service.git
|
||||
image: frishi/comicvine-service
|
||||
container_name: comicvine-api
|
||||
ports:
|
||||
- "3080:3080"
|
||||
environment:
|
||||
SERVICES: api
|
||||
PORT: 3080
|
||||
env_file: comicvine-service.env
|
||||
depends_on:
|
||||
- nats
|
||||
networks:
|
||||
@@ -34,16 +37,55 @@ services:
|
||||
|
||||
comicvine:
|
||||
build:
|
||||
context: .
|
||||
context: https://github.com/rishighan/comicvine-service.git
|
||||
image: frishi/comicvine-service
|
||||
container_name: comicvine-service
|
||||
environment:
|
||||
SERVICES: comicvine
|
||||
env_file: comicvine-service.env
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
importapi:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-import-service.git
|
||||
image: frishi/threetwo-import-service
|
||||
container_name: threetwo-import-api
|
||||
ports:
|
||||
- "3080:3080"
|
||||
- "3000:3000"
|
||||
environment:
|
||||
SERVICES: api
|
||||
env_file: threetwo-import-service.env
|
||||
depends_on:
|
||||
- nats
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
import:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-import-service.git
|
||||
image: frishi/threetwo-import-service
|
||||
container_name: import
|
||||
environment:
|
||||
SERVICES: import
|
||||
env_file: threetwo-import-service.env
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
imagetransformation:
|
||||
build:
|
||||
context: https://github.com/rishighan/threetwo-import-service.git
|
||||
image: frishi/threetwo-import-service
|
||||
container_name: image-transformation
|
||||
environment:
|
||||
SERVICES: imagetransformation
|
||||
env_file: threetwo-import-service.env
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
nats:
|
||||
image: nats:2
|
||||
container_name: transporter
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
|
||||
18
proxy.conf
18
proxy.conf
@@ -1,16 +1,22 @@
|
||||
server {
|
||||
listen 8050;
|
||||
|
||||
listen 8050;
|
||||
location / {
|
||||
proxy_pass http://host.docker.internal:8050;
|
||||
}
|
||||
}
|
||||
|
||||
location /import-service {
|
||||
proxy_pass http://host.docker.internal:3000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 3080;
|
||||
|
||||
location /comicvine-service {
|
||||
proxy_pass http://host.docker.internal:3080;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 3000;
|
||||
|
||||
location /comicvine-service {
|
||||
proxy_pass http://host.docker.internal:3000;
|
||||
}
|
||||
}
|
||||
9
threetwo-import-service.env
Normal file
9
threetwo-import-service.env
Normal file
@@ -0,0 +1,9 @@
|
||||
NAMESPACE=
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=dist/services
|
||||
|
||||
TRANSPORTER=nats://nats:4222
|
||||
|
||||
CACHER=Memory
|
||||
|
||||
Reference in New Issue
Block a user