From dcaef8060844cfb17034275c146c5decbca7dfd4 Mon Sep 17 00:00:00 2001 From: mutugiii Date: Wed, 11 Jun 2025 14:06:56 +0300 Subject: [PATCH 1/3] update dev instructions --- pages/vi/vi-docker-development-tutorial.md | 57 +++++++++++++--------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/pages/vi/vi-docker-development-tutorial.md b/pages/vi/vi-docker-development-tutorial.md index f2b9778861..b01a871860 100644 --- a/pages/vi/vi-docker-development-tutorial.md +++ b/pages/vi/vi-docker-development-tutorial.md @@ -58,36 +58,47 @@ Next, run `ng version` to check your Angular CLI version, look for `Angular CLI: 1. Create a `planetdev` directory for the planet dev data: ```bash - sudo mkdir -p /srv/planetdev && cd /srv/planetdev + mkdir -p /srv/planetdev && cd /srv/planetdev ``` -2. Download the development yml file: +2. Create a `planet-dev.yml` file and copy the content below into the file: ```bash - sudo wget https://raw.githubusercontent.com/ole-vi/planet-prod-configs/main/planet-dev.yml - ``` - -3. Start the containers: `sudo docker compose -f planet-dev.yml -p planet-dev up -d` -4. After a minute, run `sudo docker ps -a` to verify that you have 2 runnning containers – `chatapi` and `couchdb`, the `db-init` container should have exited. - - If `chatapi` service is restarting or exited, please ignore it for now as we are working on a fix - -### macOS/Windows - -1. Create a `planetdev` directory for the planet dev data: - - ```bash - mkdir -p ~/srv/planetdev && cd ~/srv/planetdev - ``` - -2. Download the development yml file: - - ```bash - curl https://gist.githubusercontent.com/xyb994/0d14dfe302df0df0d4e8d8df0d1d5feb/raw/planet-dev-mac.yml -o planet-dev.yml + services: + couchdb: + expose: + - 5984 + image: treehouses/couchdb:2.3.1 + ports: + - "2200:5984" + volumes: + - "~/srv/planetdev/conf:/opt/couchdb/etc/local.d" + - "~/srv/planetdev/data:/opt/couchdb/data" + - "~/srv/planetdev/log:/opt/couchdb/var/log" + chatapi: + image: treehouses/planet:chatapi + depends_on: + - couchdb + ports: + - "5400:5400" + environment: + - COUCHDB_HOST=http://couchdb:5984 + #- COUCHDB_USER=planet + #- COUCHDB_PASS=planet + - SERVE_PORT=5400 + db-init: + image: treehouses/planet:db-init + depends_on: + - couchdb + environment: + - COUCHDB_HOST=http://couchdb:5984 + #- COUCHDB_USER=planet + #- COUCHDB_PASS=planet ``` 3. Start the containers: `docker compose -f planet-dev.yml -p planet-dev up -d` 4. After a minute, run `docker ps -a` to verify that you have 2 runnning containers – `chatapi` and `couchdb`, the `db-init` container should have exited. - - If `chatapi` service is restarting or exited, please ignore it for now as we are working on a fix + - If `chatapi` service is restarting or exited, please ignore it for now. ## Configure CORS for CouchDB with add-cors-to-couchdb project: @@ -169,7 +180,7 @@ Install dependecies and serve the app ||**production**|**development**| |---|--------------|---------------| | *planet* | 3300 | 3000 | -| *chatapi* | 5050 | 5000 (5400 for mac/windows) | +| *chatapi* | 5050 | 5400 | | *couchdb* | 2300 | 2200 | --- From 2d15abefc7330ea6166874e3b29d80c4679ad9e5 Mon Sep 17 00:00:00 2001 From: mutugiii Date: Wed, 11 Jun 2025 14:19:45 +0300 Subject: [PATCH 2/3] update linux info --- pages/vi/vi-docker-development-tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/vi/vi-docker-development-tutorial.md b/pages/vi/vi-docker-development-tutorial.md index b01a871860..eabaaf8f32 100644 --- a/pages/vi/vi-docker-development-tutorial.md +++ b/pages/vi/vi-docker-development-tutorial.md @@ -53,7 +53,7 @@ Next, run `ng version` to check your Angular CLI version, look for `Angular CLI: ## Container Setup -### Linux +**Note**: For linux systems, you may need to run the commands with `sudo` if you encounter permission issues. 1. Create a `planetdev` directory for the planet dev data: From 398c8796aec54c550d256efd39156fea1b4b5772 Mon Sep 17 00:00:00 2001 From: mutugiii Date: Tue, 24 Jun 2025 15:17:41 +0300 Subject: [PATCH 3/3] Update instructions --- pages/vi/vi-docker-development-tutorial.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/vi/vi-docker-development-tutorial.md b/pages/vi/vi-docker-development-tutorial.md index eabaaf8f32..03ce612ef9 100644 --- a/pages/vi/vi-docker-development-tutorial.md +++ b/pages/vi/vi-docker-development-tutorial.md @@ -80,12 +80,12 @@ Next, run `ng version` to check your Angular CLI version, look for `Angular CLI: depends_on: - couchdb ports: - - "5400:5400" + - "5xxx:5xxx" environment: - COUCHDB_HOST=http://couchdb:5984 #- COUCHDB_USER=planet #- COUCHDB_PASS=planet - - SERVE_PORT=5400 + - SERVE_PORT=5xxx db-init: image: treehouses/planet:db-init depends_on: @@ -96,6 +96,8 @@ Next, run `ng version` to check your Angular CLI version, look for `Angular CLI: #- COUCHDB_PASS=planet ``` +**Note**: Replace `5xxx` with `5000` for Linux and `5400` for macOS/Windows. This is the port that the chatapi service will run on. + 3. Start the containers: `docker compose -f planet-dev.yml -p planet-dev up -d` 4. After a minute, run `docker ps -a` to verify that you have 2 runnning containers – `chatapi` and `couchdb`, the `db-init` container should have exited. - If `chatapi` service is restarting or exited, please ignore it for now. @@ -180,7 +182,7 @@ Install dependecies and serve the app ||**production**|**development**| |---|--------------|---------------| | *planet* | 3300 | 3000 | -| *chatapi* | 5050 | 5400 | +| *chatapi* | 5050 | 5000 (5400 for mac/windows) | | *couchdb* | 2300 | 2200 | ---