Skip to content

Commit 61851a0

Browse files
authored
update vi-docker-development-tutorial.md (fixes #3625) (#3626)
1 parent 210f472 commit 61851a0

File tree

1 file changed

+35
-22
lines changed

1 file changed

+35
-22
lines changed

pages/vi/vi-docker-development-tutorial.md

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,41 +53,54 @@ Next, run `ng version` to check your Angular CLI version, look for `Angular CLI:
5353

5454
## Container Setup
5555

56-
### Linux
56+
**Note**: For linux systems, you may need to run the commands with `sudo` if you encounter permission issues.
5757

5858
1. Create a `planetdev` directory for the planet dev data:
5959

6060
```bash
61-
sudo mkdir -p /srv/planetdev && cd /srv/planetdev
61+
mkdir -p /srv/planetdev && cd /srv/planetdev
6262
```
6363

64-
2. Download the development yml file:
64+
2. Create a `planet-dev.yml` file and copy the content below into the file:
6565

6666
```bash
67-
sudo wget https://raw.githubusercontent.com/ole-vi/planet-prod-configs/main/planet-dev.yml
67+
services:
68+
couchdb:
69+
expose:
70+
- 5984
71+
image: treehouses/couchdb:2.3.1
72+
ports:
73+
- "2200:5984"
74+
volumes:
75+
- "~/srv/planetdev/conf:/opt/couchdb/etc/local.d"
76+
- "~/srv/planetdev/data:/opt/couchdb/data"
77+
- "~/srv/planetdev/log:/opt/couchdb/var/log"
78+
chatapi:
79+
image: treehouses/planet:chatapi
80+
depends_on:
81+
- couchdb
82+
ports:
83+
- "5xxx:5xxx"
84+
environment:
85+
- COUCHDB_HOST=http://couchdb:5984
86+
#- COUCHDB_USER=planet
87+
#- COUCHDB_PASS=planet
88+
- SERVE_PORT=5xxx
89+
db-init:
90+
image: treehouses/planet:db-init
91+
depends_on:
92+
- couchdb
93+
environment:
94+
- COUCHDB_HOST=http://couchdb:5984
95+
#- COUCHDB_USER=planet
96+
#- COUCHDB_PASS=planet
6897
```
6998

70-
3. Start the containers: `sudo docker compose -f planet-dev.yml -p planet-dev up -d`
71-
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.
72-
- If `chatapi` service is restarting or exited, please ignore it for now as we are working on a fix
73-
74-
### macOS/Windows
75-
76-
1. Create a `planetdev` directory for the planet dev data:
77-
78-
```bash
79-
mkdir -p ~/srv/planetdev && cd ~/srv/planetdev
80-
```
81-
82-
2. Download the development yml file:
83-
84-
```bash
85-
curl https://gist.githubusercontent.com/xyb994/0d14dfe302df0df0d4e8d8df0d1d5feb/raw/planet-dev-mac.yml -o planet-dev.yml
86-
```
99+
**Note**: Replace `5xxx` with `5000` for Linux and `5400` for macOS/Windows. This is the port that the chatapi service will run on.
87100

88101
3. Start the containers: `docker compose -f planet-dev.yml -p planet-dev up -d`
89102
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.
90-
- If `chatapi` service is restarting or exited, please ignore it for now as we are working on a fix
103+
- If `chatapi` service is restarting or exited, please ignore it for now.
91104

92105
## Configure CORS for CouchDB with add-cors-to-couchdb project:
93106

0 commit comments

Comments
 (0)