Skip to content

Commit eebb43b

Browse files
committed
Changed to localhost:3001
1 parent abd0726 commit eebb43b

File tree

8 files changed

+69
-49
lines changed

8 files changed

+69
-49
lines changed

client/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Simply run below command to start a backend server.
1010

1111
```bash
12-
docker run -d --name lowcoder -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
12+
docker run -d --name lowcoder -p 3001:3001 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
1313
```
1414

1515
For more information, view our [docs](../docs/self-hosting)
@@ -26,15 +26,15 @@ docker build -f ./deploy/docker/Dockerfile -t lowcoder-dev .
2626
3. Start
2727

2828
```bash
29-
docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoder-dev
29+
docker run -d --name lowcoder-dev -p 3001:3001 -v "$PWD/stacks:/lowcoder-stacks" lowcoder-dev
3030
```
3131

3232
### Start develop
3333

3434
1. Check out source code.
3535
2. Change to client dir in the repository root via cd client.
3636
3. Run yarn to install dependencies: .
37-
4. Start dev server: `LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start`.
37+
4. Start dev server: `LOWCODER_API_SERVICE_URL=http://localhost:3001 yarn start`.
3838
5. After dev server starts successfully, it will be automatically opened in the default browser.
3939

4040
### Before submitting a pull request

client/packages/lowcoder-sdk/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const viteConfig: UserConfig = {
5454
server: {
5555
proxy: {
5656
"/api": {
57-
target: "http://localhost:3000",
57+
target: "http://localhost:3001",
5858
changeOrigin: false,
5959
},
6060
},

deploy/docker/Dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
##
44
FROM eclipse-temurin:17-jdk-jammy AS jre-build
55
RUN jlink --add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.incubator.foreign,jdk.incubator.vector,jdk.internal.vm.ci,jdk.jdwp.agent,jdk.jfr,jdk.jsobject,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.xml.dom,jdk.zipfs,jdk.attach \
6-
--output /build/jre \
7-
--no-man-pages \
8-
--no-header-files \
9-
--compress=2
6+
--output /build/jre \
7+
--no-man-pages \
8+
--no-header-files \
9+
--compress=2
1010

1111
##
1212
## Build Lowcoder api-service application
@@ -70,8 +70,8 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-re
7070

7171
# Download nodejs and install yarn
7272
RUN curl -sL https://deb.nodesource.com/setup_19.x | bash - \
73-
&& apt-get install --no-install-recommends -y nodejs \
74-
&& npm install -g yarn
73+
&& apt-get install --no-install-recommends -y nodejs \
74+
&& npm install -g yarn
7575

7676
# Copy and build the node-service app
7777
COPY server/node-service/ /lowcoder/node-service/app/
@@ -148,15 +148,15 @@ COPY deploy/docker/frontend/00-change-nginx-user.sh /docker-entrypoint.d/00-chan
148148
COPY deploy/docker/frontend/01-update-nginx-conf.sh /docker-entrypoint.d/01-update-nginx-conf.sh
149149

150150
RUN chmod +x /docker-entrypoint.d/00-change-nginx-user.sh && \
151-
chmod +x /docker-entrypoint.d/01-update-nginx-conf.sh
151+
chmod +x /docker-entrypoint.d/01-update-nginx-conf.sh
152152

153153
COPY deploy/docker/frontend/nginx-http.conf /etc/nginx/nginx-http.conf
154154
COPY deploy/docker/frontend/nginx-https.conf /etc/nginx/nginx-https.conf
155155
COPY deploy/docker/frontend/ssl-certificate.conf /etc/nginx/ssl-certificate.conf
156156
COPY deploy/docker/frontend/ssl-params.conf /etc/nginx/ssl-params.conf
157157

158158

159-
EXPOSE 3000
159+
EXPOSE 3001
160160
EXPOSE 3443
161161

162162
#############################################################################
@@ -175,17 +175,17 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
175175
&& echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg arch=amd64,arm64] http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
176176
&& curl -sL https://deb.nodesource.com/setup_19.x | bash - \
177177
&& if [ "$(dpkg --print-architecture)" = "amd64" ] || [ "$(dpkg --print-architecture)" = "i386" ]; then \
178-
curl -sL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb --output libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb; \
178+
curl -sL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb --output libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb; \
179179
else \
180-
curl -sL http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb --output libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb; \
180+
curl -sL http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb --output libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb; \
181181
fi \
182182
&& dpkg -i libssl1.1_1.1.1f-1ubuntu2_$(dpkg --print-architecture).deb \
183183
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends -y \
184-
mongodb-org \
185-
redis \
186-
supervisor \
187-
gosu \
188-
nodejs \
184+
mongodb-org \
185+
redis \
186+
supervisor \
187+
gosu \
188+
nodejs \
189189
&& npm install -g yarn \
190190
&& rm -rf /var/cache/apt/lists
191191

@@ -201,7 +201,7 @@ COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/etc /lowcoder/etc
201201
# Add startup script
202202
COPY --chown=lowcoder:lowcoder deploy/docker/all-in-one/entrypoint.sh /lowcoder/entrypoint.sh
203203

204-
EXPOSE 3000
204+
EXPOSE 3001
205205
EXPOSE 3443
206206

207207
ENTRYPOINT [ "/bin/sh" , "/lowcoder/entrypoint.sh" ]

deploy/docker/docker-compose-multi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ services:
7272
image: lowcoderorg/lowcoder-ce-frontend:latest
7373
container_name: lowcoder-frontend
7474
ports:
75-
- "3001:3000"
75+
- "3001:3001"
7676
environment:
7777
PUID: "9001"
7878
PGID: "9001"

deploy/docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
image: lowcoderorg/lowcoder-ce:latest
99
container_name: lowcoder
1010
ports:
11-
- "3000:3000"
11+
- "3001:3001"
1212
- "3443:3443"
1313
environment:
1414
# enable services

deploy/docker/frontend/nginx-http.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ http {
3232
#tcp_nopush on;
3333

3434
server {
35-
listen 3000 default_server;
35+
listen 3001 default_server;
3636
root /lowcoder/client;
3737

3838
proxy_connect_timeout __LOWCODER_MAX_QUERY_TIMEOUT__;

docs/self-hosting/README.md

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Also, for developers in need of stateless containers in cluster environment, we
1010

1111
### Prerequisites
1212

13-
* [Docker](https://docs.docker.com/get-docker/) (version 20.10.7 or above)
14-
* [Docker-Compose](https://docs.docker.com/compose/install/) (version 1.29.2 or above)
13+
- [Docker](https://docs.docker.com/get-docker/) (version 20.10.7 or above)
14+
- [Docker-Compose](https://docs.docker.com/compose/install/) (version 1.29.2 or above)
1515

1616
{% hint style="info" %}
1717
Recommended system spec: 1-core CPU and 2 GB RAM.
@@ -35,10 +35,13 @@ Follow the steps below:
3535
1. Download the configuration file by clicking [docker-compose.yml](https://raw.githubusercontent.com/lowcoder-org/lowcoder/main/deploy/docker/docker-compose.yaml) or running the curl command: 
3636

3737
{% code overflow="wrap" %}
38+
3839
```bash
3940
curl https://raw.githubusercontent.com/lowcoder-org/lowcoder/main/deploy/docker/docker-compose.yaml -o $PWD/docker-compose.yml
4041
```
42+
4143
{% endcode %}
44+
4245
2. Start the Docker container by running this command:
4346

4447
```bash
@@ -48,7 +51,6 @@ Follow the steps below:
4851
\
4952
The docker image, about 400 MB, is downloaded during the initial start-up.\
5053

51-
5254
<figure><img src="../.gitbook/assets/download-ce.png" alt=""><figcaption></figcaption></figure>
5355

5456
After downloading, it usually takes less than 30 seconds to start the service.\
@@ -59,23 +61,25 @@ Follow the steps below:
5961
docker logs -f openblocks
6062
```
6163

62-
63-
6464
When you see `frontend`, `backend`, `redis`, and `mongo` `entered the RUNNING state`, the Lowcoder service has officially started:&#x20;
6565

6666
<figure><img src="../.gitbook/assets/check-logs-ce.png" alt=""><figcaption></figcaption></figure>
67+
6768
4. Visit [**http://localhost:3000**](http://localhost:3000) and click **Sign up**. Lowcoder will automatically create a workspace for you, then you can start building your apps and invite members to your workspace.
6869

69-
<figure><img src="../.gitbook/assets/after-deployment.png" alt=""><figcaption></figcaption></figure>
70-
{% endtab %}
70+
<figure><img src="../.gitbook/assets/after-deployment.png" alt=""><figcaption></figcaption></figure>
71+
72+
{% endtab %}
7173

7274
{% tab title="Docker" %}
7375
Run the command below:
7476

7577
{% code overflow="wrap" %}
78+
7679
```bash
77-
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
80+
docker run -d --name openblocks -p 3001:3001 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
7881
```
82+
7983
{% endcode %}
8084
{% endtab %}
8185
{% endtabs %}
@@ -91,17 +95,20 @@ docker-compose pull
9195
docker-compose rm -fsv openblocks
9296
docker-compose up -d
9397
```
98+
9499
{% endtab %}
95100

96101
{% tab title="Docker" %}
97102
Run the following commands to update to the latest Lowcoder image:
98103

99104
{% code overflow="wrap" %}
105+
100106
```bash
101107
docker pull lowcoderorg/lowcoder-ce
102108
docker rm -fv openblocks
103-
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
109+
docker run -d --name openblocks -p 3001:3001 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
104110
```
111+
105112
{% endcode %}
106113
{% endtab %}
107114
{% endtabs %}
@@ -110,15 +117,15 @@ docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks"
110117

111118
For developers who require stateless containers in a cluster environment, we offer separate images of backend and frontend service with a customizable Dockerfile. A well-functioning Lowcoder deployment consists of below services:
112119

113-
* **api-service**: Backend service.
114-
* **node-service**: Backend service.
115-
* **frontend**: Frontend service.
116-
* **MongoDB**: Used for persisting data of users, apps, data sources, etc.
117-
* **Redis**: Used for maintaining user sessions, rate limiter, etc.
120+
- **api-service**: Backend service.
121+
- **node-service**: Backend service.
122+
- **frontend**: Frontend service.
123+
- **MongoDB**: Used for persisting data of users, apps, data sources, etc.
124+
- **Redis**: Used for maintaining user sessions, rate limiter, etc.
118125

119126
### Prerequisites
120127

121-
* [Docker-Compose](https://docs.docker.com/compose/install/) (version 1.29.2 or above)
128+
- [Docker-Compose](https://docs.docker.com/compose/install/) (version 1.29.2 or above)
122129

123130
### Deploy
124131

@@ -128,24 +135,28 @@ For developers who require stateless containers in a cluster environment, we off
128135
mkdir openblocks
129136
cd openblocks
130137
```
138+
131139
2. Download the configuration file by clicking [docker-compose-multi.yml](https://raw.githubusercontent.com/lowcoder-org/lowcoder/main/deploy/docker/docker-compose-multi.yaml) or running the curl command:
132140

133141
<pre class="language-bash" data-overflow="wrap"><code class="lang-bash"><strong>curl https://raw.githubusercontent.com/lowcoder-org/lowcoder/main/deploy/docker/docker-compose-multi.yaml -o $PWD/docker-compose-multi.yml
134142
</strong></code></pre>
143+
135144
3. Modify service configurations in the downloaded Dockerfile according to your needs:
136145

137146
<figure><img src="../.gitbook/assets/docker-compose-multi.jpeg" alt=""><figcaption></figcaption></figure>
138147

139-
* **mongodb**: Start a new MongoDB instance on your host. You can delete this part and modify the environment variable `MONGODB_URL` of **openblocks-api-service** to use your own MongoDB.
140-
* **redis**: Start a new Redis instance on your host. You can delete this part and modify the environment variable `REDIS_URL` of **openblocks-api-service** to use your own Redis.
141-
* **openblocks-api-service**: Required.&#x20;
142-
* **openblocks-node-service**: Required.
143-
* **openblocks-frontend**: Required. Can be optional if you deploy frontend on CDN.
148+
- **mongodb**: Start a new MongoDB instance on your host. You can delete this part and modify the environment variable `MONGODB_URL` of **openblocks-api-service** to use your own MongoDB.
149+
- **redis**: Start a new Redis instance on your host. You can delete this part and modify the environment variable `REDIS_URL` of **openblocks-api-service** to use your own Redis.
150+
- **openblocks-api-service**: Required.&#x20;
151+
- **openblocks-node-service**: Required.
152+
- **openblocks-frontend**: Required. Can be optional if you deploy frontend on CDN.
153+
144154
4. Start Docker containers by running this command:
145155

146156
```bash
147157
docker-compose -f docker-compose-multi.yml up -d
148158
```
159+
149160
5. Visit [**http://localhost:3000**](http://localhost:3000) and click **Sign up**. Lowcoder will automatically create a workspace for you, then you can start building your apps and invite members to your workspace.
150161

151162
<figure><img src="../.gitbook/assets/after-deployment.png" alt=""><figcaption></figcaption></figure>
@@ -184,6 +195,7 @@ docker stop openblocks
184195
docker rm openblocks
185196
# run your new docker run command
186197
```
198+
187199
{% endtab %}
188200
{% endtabs %}
189201

@@ -207,9 +219,11 @@ Add environment variables `MONGODB_URL` and `REDIS_URL` in `docker-compose.yml`
207219
Add environment variables `MONGODB_URL` and `REDIS_URL` to the deployment command, as shown below:
208220

209221
{% code overflow="wrap" %}
222+
210223
```bash
211-
docker run -d --name openblocks -e MONGODB_URL=YOUR_MONGODB_URL REDIS_URL=YOUR_REDIS_URL -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks lowcoderorg/lowcoder-ce
224+
docker run -d --name openblocks -e MONGODB_URL=YOUR_MONGODB_URL REDIS_URL=YOUR_REDIS_URL -p 3001:3001 -v "$PWD/stacks:/openblocks-stacks lowcoderorg/lowcoder-ce
212225
```
226+
213227
{% endcode %}
214228
{% endtab %}
215229
{% endtabs %}
@@ -228,9 +242,11 @@ Add an environment variable `LOCAL_USER_ID` in `docker-compose.yml` downloaded i
228242
Add an environment variable `LOCAL_USER_ID` to the deployment command, as shown below:
229243
230244
{% code overflow="wrap" %}
245+
231246
```bash
232-
docker run -d --name openblocks -e LOCAL_USER_ID=10010 -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
247+
docker run -d --name openblocks -e LOCAL_USER_ID=10010 -p 3001:3001 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
233248
```
249+
234250
{% endcode %}
235251
{% endtab %}
236252
{% endtabs %}
@@ -241,19 +257,23 @@ With an SSL certificate, you can securely visit self-hosted Lowcoder with HTTPS
241257
242258
{% tabs %}
243259
{% tab title="Docker-Compose" %}
260+
244261
1. Copy `fullchain.pem` and `privkey.pem` to the `$PWD/stacks/ssl` directory.
245262
2. In `$PWD/docker-compose.yml`, change the value of `ports` to `"3443:3443"`.\
246-
![](../.gitbook/assets/ssl-certificates.png)
247-
{% endtab %}
263+
![](../.gitbook/assets/ssl-certificates.png)
264+
{% endtab %}
248265
249266
{% tab title="Docker" %}
267+
250268
1. Copy `fullchain.pem` and `privkey.pem` to the `$PWD/stacks/ssl` directory.
251269
2. Change the `ports` in the deployment command to `3443:3443`, as shown below:
252270
253271
{% code overflow="wrap" %}
272+
254273
```bash
255274
docker run -d --name openblocks -p 3443:3443 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
256275
```
276+
257277
{% endcode %}
258278
{% endtab %}
259279
{% endtabs %}

0 commit comments

Comments
 (0)