🐳 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]
|
3. `comicvine-service` [https://github.com/rishighan/comicvine-service]
|
||||||
## Local Development
|
## Local Development
|
||||||
|
|
||||||
1. Clone this repo
|
The recommended approach is to simply use `docker-compose` which spins up containers for the UI and all the associated microservices and data store.
|
||||||
2. `yarn run dev` (you can ignore the warnings)
|
To do that:
|
||||||
3.
|
|
||||||
|
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:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx
|
||||||
|
container_name: proxy
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -21,12 +22,14 @@ services:
|
|||||||
|
|
||||||
comicvineapi:
|
comicvineapi:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: https://github.com/rishighan/comicvine-service.git
|
||||||
image: frishi/comicvine-service
|
image: frishi/comicvine-service
|
||||||
container_name: comicvine-api
|
container_name: comicvine-api
|
||||||
|
ports:
|
||||||
|
- "3080:3080"
|
||||||
environment:
|
environment:
|
||||||
SERVICES: api
|
SERVICES: api
|
||||||
PORT: 3080
|
env_file: comicvine-service.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- nats
|
- nats
|
||||||
networks:
|
networks:
|
||||||
@@ -34,16 +37,55 @@ services:
|
|||||||
|
|
||||||
comicvine:
|
comicvine:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: https://github.com/rishighan/comicvine-service.git
|
||||||
image: frishi/comicvine-service
|
image: frishi/comicvine-service
|
||||||
container_name: 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:
|
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:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
nats:
|
nats:
|
||||||
image: nats:2
|
image: nats:2
|
||||||
|
container_name: transporter
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
|
|||||||
18
proxy.conf
18
proxy.conf
@@ -1,16 +1,22 @@
|
|||||||
server {
|
server {
|
||||||
listen 8050;
|
listen 8050;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://host.docker.internal:8050;
|
proxy_pass http://host.docker.internal:8050;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
location /import-service {
|
server {
|
||||||
proxy_pass http://host.docker.internal:3000;
|
listen 3080;
|
||||||
}
|
|
||||||
|
|
||||||
location /comicvine-service {
|
location /comicvine-service {
|
||||||
proxy_pass http://host.docker.internal:3080;
|
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