@@ -12,21 +12,23 @@ The docker compose files are in `compose/` folder. There are two stacks:
1212- The ` prod ` stack builds the images instead of mounting ` src ` folders, for the
1313 purpose of testing image builds.
1414
15- ## Prerequisite
15+ To install docker-compose, follow [ this official instruction ] ( https://docs.docker.com/compose/install/linux/ ) .
1616
17- Make sure you have the runtime containers images pulled.
17+
18+ ## Pull the docker images
1819
1920- TODO automatically pull the images?
2021- TODO use a more generic image tag here, e.g. latest
2122
2223```
24+
2325docker pull lihebi/codepod-kernel-python
2426docker pull lihebi/codepod-runtime
2527```
2628
27- ## Usage
29+ ## Configuration and starting the services
2830
29- First, create a ` dev/.env ` file with the following content (change the value to
31+ First, create a ` dev/.env ` file with the following content (leave as is or change the value to
3032whatever you want):
3133
3234```
@@ -36,11 +38,10 @@ POSTGRES_DB=mydbname
3638JWT_SECRET=mysupersecretjwttoken
3739```
3840
39- Then, modify the nginx.conf and change the ` server_name ` field to your choices.
41+ Then, modify the ` nginx.conf ` and change the ` server_name ` field to your choices.
4042For example, if you are running on localhost, you can use:
4143
4244```
43- server_name web.127.0.0.1.sslip.io;
4445server_name prisma.127.0.0.1.sslip.io;
4546```
4647
@@ -52,15 +53,21 @@ docker compose up -d
5253```
5354
5455If this is your first time running it, the database is empty, and you need to
55- initialize the database. To do that, shell into the API container and run
56+ initialize the database. To do that, shell into the API container
57+
58+ ``` shell
59+ docker exec -it dev-api-1 bash
60+ ```
61+
62+ and run
5663
5764```
5865npx prisma migrate dev --name init
5966```
6067
6168Wait a few minutes for packages installation and compilation. Once ` ui ` and
6269` api ` containers are ready listening on http ports, go to the DNS name you set
63- above, e.g. ` http://web .127.0.0.1.sslip.io ` , and you should see the web app UI.
70+ above, e.g. ` http://codepod .127.0.0.1.sslip.io ` , and you should see the web app UI.
6471Additional tools:
6572
6673- ` http://web.127.0.0.1.sslip.io/graphql ` : Apollo GraphQL explorer for the backend APIs
0 commit comments