Skip to content

Commit 119cf39

Browse files
Merge branch 'canary' of github.com:makeplane/plane into preview
2 parents 234b088 + bc37edb commit 119cf39

File tree

5 files changed

+54
-42
lines changed

5 files changed

+54
-42
lines changed

apps/proxy/Caddyfile.aio.ce

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
(plane_proxy) {
2+
request_body {
3+
max_size {$FILE_SIZE_LIMIT}
4+
}
5+
6+
handle /spaces/* {
7+
reverse_proxy localhost:3002
8+
}
9+
10+
handle /live/* {
11+
reverse_proxy localhost:3005
12+
}
13+
handle /api/* {
14+
reverse_proxy localhost:3004
15+
}
16+
17+
handle /auth/* {
18+
reverse_proxy localhost:3004
19+
}
20+
21+
handle_path /god-mode* {
22+
root * /app/admin
23+
try_files {path} {path}/ /index.html
24+
file_server
25+
}
26+
handle_path /* {
27+
root * /app/web
28+
try_files {path} {path}/ /index.html
29+
file_server
30+
}
31+
}
32+
33+
{
34+
{$CERT_EMAIL}
35+
acme_ca {$CERT_ACME_CA:https://acme-v02.api.letsencrypt.org/directory}
36+
{$CERT_ACME_DNS}
37+
servers {
38+
max_header_size 25MB
39+
client_ip_headers X-Forwarded-For X-Real-IP
40+
trusted_proxies static {$TRUSTED_PROXIES:0.0.0.0/0}
41+
}
42+
}
43+
44+
{$SITE_ADDRESS} {
45+
import plane_proxy
46+
}

apps/proxy/Caddyfile.ce

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
reverse_proxy /static/* api:8000
1919

2020
reverse_proxy /{$BUCKET_NAME}/* plane-minio:9000
21+
reverse_proxy /{$BUCKET_NAME} plane-minio:9000
2122

2223
reverse_proxy /* web:3000
2324
}

deployments/aio/community/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ COPY --from=node /usr/local/lib /usr/local/lib
3131
COPY --from=node /usr/local/include /usr/local/include
3232
COPY --from=node /usr/local/bin /usr/local/bin
3333

34-
COPY --from=web-img /app /app/web
34+
COPY --from=web-img /usr/share/nginx/html /app/web
3535
COPY --from=space-img /app /app/space
36-
COPY --from=admin-img /app /app/admin
36+
COPY --from=admin-img /usr/share/nginx/html/god-mode /app/admin
3737
COPY --from=live-img /app /app/live
3838

39-
RUN rm -rf /app/web/apps/web/.next/cache && \
40-
rm -rf /app/space/apps/space/.next/cache && \
41-
rm -rf /app/admin/apps/admin/.next/cache
39+
RUN rm -rf /app/space/apps/space/.next/cache
4240

4341
COPY --from=proxy-img /usr/bin/caddy /usr/bin/caddy
4442
COPY dist/Caddyfile /app/proxy/Caddyfile

deployments/aio/community/build.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ update_env_file(){
9595

9696
build_dist_files(){
9797
cp ./variables.env $DIST_DIR/plane.env
98-
cp ../../../apps/proxy/Caddyfile.ce $DIST_DIR/Caddyfile
98+
cp ../../../apps/proxy/Caddyfile.aio.ce $DIST_DIR/Caddyfile
9999

100100
echo "" >> $DIST_DIR/plane.env
101101
echo "" >> $DIST_DIR/plane.env
@@ -108,16 +108,6 @@ build_dist_files(){
108108
update_env_file $DIST_DIR/plane.env "API_BASE_URL" "http://localhost:3004"
109109
update_env_file $DIST_DIR/plane.env "SITE_ADDRESS" ":80"
110110

111-
# remove this line containing `plane-minio:9000`
112-
remove_line $DIST_DIR/Caddyfile "plane-minio:9000" ""
113-
114-
# in caddyfile, update `reverse_proxy /spaces/* space:3000` to `reverse_proxy /spaces/* space:3002`
115-
string_replace $DIST_DIR/Caddyfile "web:3000" "localhost:3001"
116-
string_replace $DIST_DIR/Caddyfile "space:3000" "localhost:3002"
117-
string_replace $DIST_DIR/Caddyfile "admin:3000" "localhost:3003"
118-
string_replace $DIST_DIR/Caddyfile "api:8000" "localhost:3004"
119-
string_replace $DIST_DIR/Caddyfile "live:3000" "localhost:3005"
120-
121111

122112
# print docker build command
123113
echo "------------------------------------------------"

deployments/aio/community/supervisor.conf

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,9 @@ stderr_logfile_backups=5
1717
priority=10
1818

1919

20-
[program:web]
21-
command=sh -c "node /app/web/apps/web/server.js"
22-
autostart=true
23-
autorestart=true
24-
stdout_logfile=/app/logs/access/web.log
25-
stderr_logfile=/app/logs/error/web.err.log
26-
# stderr_logfile=/dev/stderr
27-
stderr_logfile_maxbytes=50MB
28-
stderr_logfile_backups=5
29-
environment=PORT=3001,HOSTNAME=0.0.0.0
30-
priority=15
31-
3220
[program:space]
33-
command=sh -c "node /app/space/apps/space/server.js"
21+
directory=/app/space/apps/space/build/server
22+
command=sh -c "npx react-router-serve index.js"
3423
autostart=true
3524
autorestart=true
3625
stdout_logfile=/app/logs/access/space.log
@@ -41,18 +30,6 @@ stderr_logfile_backups=5
4130
environment=PORT=3002,HOSTNAME=0.0.0.0
4231
priority=15
4332

44-
[program:admin]
45-
command=sh -c "node /app/admin/apps/admin/server.js"
46-
autostart=true
47-
autorestart=true
48-
stdout_logfile=/app/logs/access/admin.log
49-
stderr_logfile=/app/logs/error/admin.err.log
50-
# stderr_logfile=/dev/stderr
51-
stderr_logfile_maxbytes=50MB
52-
stderr_logfile_backups=5
53-
environment=PORT=3003,HOSTNAME=0.0.0.0
54-
priority=15
55-
5633
[program:api]
5734
directory=/app/backend
5835
command=sh -c "./bin/docker-entrypoint-api.sh"
@@ -96,7 +73,7 @@ priority=20
9673

9774

9875
[program:live]
99-
command=sh -c "node /app/live/apps/live/dist/start.js"
76+
command=sh -c "node /app/live/apps/live"
10077
autostart=true
10178
autorestart=true
10279
stdout_logfile=/app/logs/access/live.log

0 commit comments

Comments
 (0)