Skip to content

Commit

Permalink
fix server entrypoint (ToolJet#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaysasidrn authored Sep 8, 2021
1 parent 44c84c4 commit cb2d8bd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion deploy/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- name: container
image: tooljet/tooljet-ce:latest
imagePullPolicy: Always
command: ["npm", "run", '--prefix', 'server', 'start:prod']
args: ["npm", 'start:prod']
resources:
limits:
memory: "2000Mi"
Expand Down
2 changes: 1 addition & 1 deletion docker/production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ RUN npm --prefix server run build

COPY ./docker/ ./docker/

RUN ["chmod", "755", "./server/entrypoint.sh"]
ENTRYPOINT ["./server/entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker/server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ RUN npm install --only=production
COPY ./server/ ./
RUN npm run build

RUN ["chmod", "755", "./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker/server.Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ COPY ./server/ ./
COPY ./.env ../.env
COPY ./.env.test ../.env.test

RUN ["chmod", "755", "entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
14 changes: 6 additions & 8 deletions docs/docs/contributing-guide/setup/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Docker compose is the easiest way to setup ToolJet server and client locally.

Make sure you have the latest version of `docker` and `docker-compose` installed.

[Official docker installation guide](https://docs.docker.com/desktop/)
[Official docker installation guide](https://docs.docker.com/desktop/)
[Official docker-compose installation guide](https://docs.docker.com/compose/install/)

We recommend:
```bash
docker --version
Docker version 19.03.12, build 48a66213fe

docker-compose --version
docker-compose version 1.26.2, build eefe0d31
```
Expand Down Expand Up @@ -77,16 +77,14 @@ docker-compose version 1.26.2, build eefe0d31
docker-compose build
```

5. ToolJet server is built using NestJS and the data such as application definitions are persisted on a postgres database. You have to create and migrate the database if building for the first time.
5. Run ToolJet
```bash
docker-compose run --rm server npm run db:create
docker-compose run --rm server npm run db:migrate
docker-compose run --rm server npm run db:seed
docker-compose up
```

6. Run ToolJet
6. ToolJet server is built using NestJS and the data such as application definitions are persisted on a postgres database. You can run the below command to seed the database.
```bash
docker-compose up
docker-compose run --rm server npm run db:seed
```

7. ToolJet should now be served locally at `http://localhost:8082`. You can login using the default user created.
Expand Down
13 changes: 2 additions & 11 deletions docs/docs/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,8 @@ For example, if the server is an AWS EC2 instance and the installation should re

7. If you've set a custom domain for `TOOLJET_HOST`, add a `A record` entry in your DNS settings to point to the IP address of the server.

8. Create the database:
```bash
docker-compose run server npm run db:create
```

9. Run database migrations:
```bash
docker-compose run server npm run db:migrate
```

10. Seed the database:
8. Seed the database:
```bash
docker-compose run server npm run db:seed
```
Expand All @@ -91,4 +82,4 @@ For example, if the server is an AWS EC2 instance and the installation should re
password: `password`


11. You're all done, ToolJet client would now be served at the URL you've set in `TOOLJET_HOST`.
9. You're all done, ToolJet client would now be served at the URL you've set in `TOOLJET_HOST`.

0 comments on commit cb2d8bd

Please sign in to comment.