Skip to content

Commit 25a266f

Browse files
authored
Update README.md
1 parent bf701de commit 25a266f

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

docker/README.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ Table of Contents
3131
* [Build image for development](#build-image-for-development)
3232
* [How to use docker to develop CodeCompass](#how-to-use-docker-to-develop-codecompass)
3333
* [Build, install and test CodeCompass](#build-install-and-test-codecompass)
34-
* [Make a Postgresql container](#make-a-postgresql-container)
35-
* [Create a network and connect CodeCompass and Postgres](#create-a-network-and-connect-codecompass-and-postgres)
36-
* [Create a Postgres user](#create-a-postgres-user)
3734
* [How to parse a project](#how-to-parse-a-project)
3835
* [How to start a webserver](#how-to-start-a-webserver)
3936
* [Deployment](#deployment)
@@ -63,7 +60,7 @@ First, you have to start a docker container from this image, which will mount
6360
your CodeCompass directory from your host and starts a shell:
6461
```bash
6562
docker run --rm -ti \
66-
--env DATABASE=pgsql --env BUILD_TYPE=Release \
63+
--env DATABASE=sqlite --env BUILD_TYPE=Release \
6764
--volume /path/to/host/CodeCompass:/CodeCompass \
6865
--volume /path/to/your/host/project:/projects/myproject \
6966
-p 8001:8080 \
@@ -80,7 +77,6 @@ have to mount a project directory if you do not want to parse it later.
8077
### Build, install and test CodeCompass
8178
You can use the `codecompass-build.sh` script inside the container to build,
8279
install and test CodeCompass:
83-
(If you get a timeout error when downloading, put this command before install: NODE_OPTIONS="--max-old-space-size=4096" NEXT_PRIVATE_BUILD_WORKER_TIMEOUT=600)
8480
```bash
8581
# Build CodeCompass.
8682
codecompass-build.sh -j8
@@ -92,52 +88,25 @@ codecompass-build.sh install
9288
codecompass-build.sh test
9389
```
9490

95-
### Make a Postgresql container
96-
You need to create a PostgreSQL container that CodeCompass can communicate with.
97-
(postgres is the image name and :15 is the specific version)
98-
```bash
99-
docker run \
100-
--name postgres_container \
101-
-e POSTGRES_PASSWORD=root_password \
102-
-d \
103-
-p 5432:5432 \
104-
postgres:15
105-
```
106-
107-
### Create a network and connect CodeCompass and Postgres
108-
Run the containers and connect them to a nework
109-
```bash
110-
docker network create my_network
111-
docker network connect my_network postgres_name
112-
docker network connect my_network codecompass_container
113-
```
114-
### Create a Postgres user
115-
You need to create a Postgres user and give it admin rights.
116-
(Run these commands from the host computer)
117-
```bash
118-
# Create user "your_user" with password "your_password" and give Superuser rights
119-
docker exec -it postgres_container psql -U postgres -d postgres -c "CREATE USER your_user WITH PASSWORD 'your_password' SUPERUSER;"
120-
```
121-
12291
### How to parse a project
12392
You can parse a project inside a docker container by using the following
12493
command:
125-
(The project must be built before parsing.)
12694
```bash
12795
CodeCompass_parser \
128-
-d "pgsql:database=myproject;host=codecompass-postgres;port=5432;user=your_user;password=your_password" \
96+
-d "sqlite:database=/CodeCompass/workspace/myproject/data.sqlite" \
12997
-w /CodeCompass/workspace \
13098
-n myproject \
13199
-i /projects/myproject
132-
-b /projects/myproject/projectname/bin/Debug \
133-
-f
134100
```
135101

136102
*Note*: the project directory should be mounted inside the container.
137103

138104
### How to start a webserver
139105
You can start a webserver inside the container by using the following command:
140106
```bash
107+
# Create a workspace directory.
108+
mkdir -p /CodeCompass/workspace
109+
141110
# Run the web server.
142111
CodeCompass_webserver \
143112
-w /CodeCompass/workspace

0 commit comments

Comments
 (0)