From 96e8e1fb17c94f1cccfb5a306a2a714d0c046dc3 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 1 Sep 2021 14:57:47 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20More=20configuration=20changes?= =?UTF-8?q?=20to=20docker-compose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++---- docker-compose.yml | 16 +++++++++++----- docker-env/comicvine-service.env | 1 - docker-env/threetwo-import-service.env | 3 +-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e1a8101..7e253ca 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ ThreeTwo! is a comic book curation app. ThreeTwo! currently is set up as: 1. The UI, this repo. -2. `threetwo-import-service` [https://github.com/rishighan/threetwo-import-service] -3. `comicvine-service` [https://github.com/rishighan/comicvine-service] -4. `threetwo-ui-typings` [https://github.com/rishighan/threetwo-frontend-types] which are the types used across the UI, installable as an `npm` dependency. +2. [threetwo-import-service](https://github.com/rishighan/threetwo-import-service) +3. [comicvine-service](https://github.com/rishighan/comicvine-service) +4. [threetwo-ui-typings](https://github.com/rishighan/threetwo-frontend-types) which are the types used across the UI, installable as an `npm` dependency. ## Docker Instructions The recommended approach is to simply use `docker-compose` which spins up containers for the UI and all the associated microservices and data store. @@ -22,7 +22,7 @@ Then: 1. Clone this repo using `git clone https://github.com/rishighan/threetwo.git` 2. Create an external docker network using `docker network create proxy` 3. Run `docker-compose up --build -d` to run the containers in detatched mode -4. For debugging you can leave out the `-d` flag +4. For debugging, run `docker-compose up --build` 5. Note that the first time, the process could take up to 10 minutes, since it is building containers for `threetwo`, `threetwo-import-service`, `comicvine-service`, `mongo`, `nats`, `nginx` 6. For posterity, check that all containers are up using `docker ps` @@ -49,3 +49,5 @@ For debugging and troubleshooting, you can run this app locally using these step ## Contribution Guidelines +See [contribution guidelines](https://github.com/rishighan/threetwo/blob/master/contributing.md) + diff --git a/docker-compose.yml b/docker-compose.yml index 2c12722..5b4adca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: SERVICES: api env_file: ./docker-env/comicvine-service.env volumes: - - 'userdata:/comicvine-service/userdata' + - './userdata:/comicvine-service/userdata' depends_on: - nats networks: @@ -36,6 +36,8 @@ services: container_name: comicvine-service environment: SERVICES: comicvine + volumes: + - './userdata:/comicvine-service/userdata' env_file: ./docker-env/comicvine-service.env networks: - proxy @@ -51,8 +53,8 @@ services: SERVICES: api env_file: ./docker-env/threetwo-import-service.env volumes: - - 'userdata:/threetwo-import-service/userdata' - - 'comics:/threetwo-import-service/comics' + - './userdata:/threetwo-import-service/userdata' + - './comics:/threetwo-import-service/comics' depends_on: - nats - mongodb @@ -69,6 +71,9 @@ services: - nats environment: SERVICES: import + volumes: + - './userdata:/threetwo-import-service/userdata' + - './comics:/threetwo-import-service/comics' env_file: ./docker-env/threetwo-import-service.env networks: - proxy @@ -78,6 +83,9 @@ services: context: https://github.com/rishighan/threetwo-import-service.git image: frishi/threetwo-import-service container_name: image-transformation + volumes: + - './userdata:/threetwo-import-service/userdata' + - './comics:/threetwo-import-service/comics' depends_on: - mongodb - nats @@ -116,8 +124,6 @@ networks: external: true volumes: - userdata: - comics: mongodb_data: driver: local diff --git a/docker-env/comicvine-service.env b/docker-env/comicvine-service.env index 68dcb92..8812c6e 100644 --- a/docker-env/comicvine-service.env +++ b/docker-env/comicvine-service.env @@ -1,4 +1,3 @@ -NAMESPACE= LOGGER=true LOGLEVEL=info SERVICEDIR=dist/services diff --git a/docker-env/threetwo-import-service.env b/docker-env/threetwo-import-service.env index 2059d18..328860f 100644 --- a/docker-env/threetwo-import-service.env +++ b/docker-env/threetwo-import-service.env @@ -1,9 +1,8 @@ -NAMESPACE= LOGGER=true LOGLEVEL=info SERVICEDIR=dist/services MONGO_URI=mongodb://db:27017/threetwo TRANSPORTER=nats://nats:4222 - +CALIBRE_PATH=/opt/calibre CACHER=Memory