File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,8 @@ LABEL maintainer="lowcoder"
139139# Change default nginx user into lowcoder user and remove default nginx config
140140RUN usermod --login lowcoder --uid 9001 nginx \
141141 && groupmod --new-name lowcoder --gid 9001 nginx \
142- && rm -f /etc/nginx/nginx.conf
142+ && rm -f /etc/nginx/nginx.conf \
143+ && mkdir -p /lowcoder/assets
143144
144145# Copy lowcoder client data
145146COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder/build/ /lowcoder/client
@@ -196,7 +197,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
196197 nodejs \
197198 openjdk-17-jdk-headless \
198199 && npm install -g yarn \
199- && rm -rf /var/cache/apt/lists
200+ && rm -rf /var/cache/apt/lists \
201+ && mkdir -p /lowcoder/assets
200202
201203# Add lowcoder api-service
202204COPY --chown=lowcoder:lowcoder --from=lowcoder-ce-api-service /lowcoder/api-service /lowcoder/api-service
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services:
1313 MONGO_INITDB_ROOT_PASSWORD : secret123
1414 # Uncomment to save database data into local 'mongodata' folder
1515 # volumes:
16- # - ./mogodata :/data/db
16+ # - ./mongodata :/data/db
1717 restart : unless-stopped
1818
1919 redis :
@@ -95,4 +95,7 @@ services:
9595 depends_on :
9696 - lowcoder-node-service
9797 - lowcoder-api-service
98+ # Uncomment to serve local files as static assets
99+ # volumes:
100+ # - ./static-assets:/lowcoder/assets
98101
Original file line number Diff line number Diff line change @@ -52,5 +52,6 @@ services:
5252 LOWCODER_MAX_QUERY_TIMEOUT : 120
5353 volumes :
5454 - ./lowcoder-stacks:/lowcoder-stacks
55+ - ./lowcoder-stacks/assets:/lowcoder/assets
5556 restart : unless-stopped
5657
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ http {
4747 }
4848 }
4949
50+ location /assets {
51+ alias /lowcoder/assets;
52+ expires 1M;
53+ }
54+
5055 location /api {
5156 proxy_set_header X-Forwarded-Proto $scheme;
5257 proxy_set_header X-Forwarded-Host $host;
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ http {
5050 }
5151 }
5252
53+ location /assets {
54+ root /lowcoder/assets;
55+ alias /lowcoder/assets;
56+ expires 1M;
57+ }
58+
5359 location /api {
5460 proxy_set_header X-Forwarded-Proto $scheme;
5561 proxy_set_header X-Forwarded-Host $host;
You can’t perform that action at this time.
0 commit comments