Skip to content

Commit 45d7673

Browse files
committed
fix nginx domain name; fix api start script
1 parent 9bfc008 commit 45d7673

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ Build the docker images:
6363
```
6464
docker build -t lihebi/codepod-ui:v0.1.0 ./ui
6565
docker build -t lihebi/codepod-api:v0.1.0 ./api
66+
docker build -t lihebi/codepod_kernel_python:v0.1.0 ./api/kernels/python
6667
```
6768

6869
Push to registry:
6970

7071
```
7172
docker push lihebi/codepod-ui:v0.1.0
7273
docker push lihebi/codepod-api:v0.1.0
74+
docker push lihebi/codepod_kernel_python:v0.1.0
7375
```
7476

7577
Create a cloud VM with docker support. Setup TLS, e.g., `app-v1.codepod.io`:
@@ -114,4 +116,11 @@ Now add DNS from domain name to the cloud server. Now go to
114116
- http://codepod.test:3000/graphql the grpahql explorer
115117
- http://codepod.test:5555 the prisma db viewer
116118

119+
Pull the kernel image:
120+
121+
```
122+
docker pull lihebi/codepod_kernel_python:v0.1.0
123+
docker tag lihebi/codepod_kernel_python:v0.1.0 codepod_kernel_python
124+
```
125+
117126
# (TODO) Architecture

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"build:watch": "tsc --watch -p tsconfig-cjs.json",
2020
"start0": "nodemon --ignore '*.json' src/server.js",
2121
"start2": "nodemon dist/cjs/server.js",
22-
"start": "ts-node -O '{\"module\": \"commonjs\"}' src/server.ts",
22+
"start": "ts-node -O '{\"module\": \"commonjs\"}' src/start-server.ts",
2323
"kernel-server": "ts-node -O '{\"module\": \"commonjs\"}' src/start-kernel-server.ts",
2424
"dev": "ts-node-dev -O '{\"module\": \"commonjs\"}' --respawn -- src/start-server.ts",
2525
"migrate": "npx prisma migrate dev --name init",

compose/prod/nginx/nginx.conf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
set $domain app-v1.codepod.io
2-
31
# By default, server /var/www/html
42
# Need to mount it! I prefer not to mount it by default so that I don't server
53
# accidently any files on host.
@@ -15,7 +13,7 @@ server {
1513
listen 80;
1614
listen [::]:80;
1715

18-
server_name $domain;
16+
server_name app-v1.codepod.io;
1917

2018
return 301 https://$host$request_uri;
2119

@@ -36,12 +34,12 @@ server {
3634
server {
3735
listen 443 ssl http2;
3836
listen [::]:443 ssl http2;
39-
server_name $domain;
37+
server_name app-v1.codepod.io;
4038

4139
server_tokens off;
4240

43-
ssl_certificate /etc/letsencrypt/live/$domain/fullchain.pem;
44-
ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem;
41+
ssl_certificate /etc/letsencrypt/live/app-v1.codepod.io/fullchain.pem;
42+
ssl_certificate_key /etc/letsencrypt/live/app-v1.codepod.io/privkey.pem;
4543

4644
location / {
4745
proxy_pass http://ui:3000;

0 commit comments

Comments
 (0)