-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
955986c
commit 88a0e32
Showing
429 changed files
with
64,674 additions
and
58,973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
authority_config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# FROM node:16.20.0 AS builder | ||
|
||
# WORKDIR /src | ||
# COPY pa_note_front /src | ||
|
||
# RUN ls | ||
# RUN npm install -g pnpm | ||
# RUN pnpm install | ||
# RUN pnpm build | ||
|
||
FROM nginx:alpine-slim | ||
|
||
RUN mkdir -p /usr/share/nginx/front/dist | ||
|
||
COPY docker/front_nginx.conf /etc/nginx/nginx.conf | ||
|
||
# COPY --from=builder /src/dist /usr/share/nginx/front/dist | ||
COPY pa_note_front/dist /usr/share/nginx/front/dist | ||
|
||
EXPOSE 3333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM panote_server_builder:v1 AS builder | ||
|
||
FROM rust:1.70 AS server | ||
|
||
|
||
COPY --from=builder /src/target/release/pa_note_server /etc/server/pa_note_server | ||
COPY docker/authority_config.json /etc/server | ||
|
||
WORKDIR /etc/server | ||
# RUN rustup default nightly | ||
RUN chmod 775 ./pa_note_server | ||
|
||
EXPOSE 3004 | ||
ENTRYPOINT ["./pa_note_server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM rust:1.70 AS builder | ||
|
||
WORKDIR /src | ||
COPY pa_note_server /src | ||
RUN rustup default nightly | ||
RUN cargo build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id":"", | ||
"pw":"", | ||
"token_secret": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker build -f docker/Dockerfile.Front -t panote_front:v1 . --no-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker build -f docker/Dockerfile.Server -t panote_server:v1 . --no-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker build -f docker/Dockerfile.ServerBuilder -t panote_server_builder:v1 . --no-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: '3' | ||
services: | ||
nginx: | ||
image: nginx:alpine-slim | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf:ro | ||
- ./certs:/etc/nginx/certs:ro | ||
depends_on: | ||
- frontend | ||
- backend | ||
|
||
frontend: | ||
image: panote_front:v1 | ||
ports: | ||
- "3333:3333" | ||
|
||
backend: | ||
image: panote_server:v1 | ||
ports: | ||
- "3004:3004" | ||
volumes: | ||
- ./panote_data:/etc/server/default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://frontend:3333; | ||
} | ||
|
||
location /panote_api/ { | ||
rewrite ^/panote_api(/.*)$ $1 break; | ||
proxy_pass http://host.docker.internal:3004; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
} | ||
} | ||
#server { | ||
# listen 443 ssl; | ||
# ; server_name your_domain.com; # Replace with your actual domain | ||
# | ||
# ssl_certificate /etc/nginx/certs/fullchain.pem; # Replace with your SSL certificate path | ||
# ssl_certificate_key /etc/nginx/certs/privkey.pem; # Replace with your SSL certificate key path | ||
# | ||
# location / { | ||
# proxy_pass http://frontend:3333; | ||
# } | ||
# | ||
# location /api { | ||
# proxy_pass http://backend:3004; | ||
# proxy_http_version 1.1; | ||
# proxy_set_header Upgrade $http_upgrade; | ||
# proxy_set_header Connection "upgrade"; | ||
# } | ||
#} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cd /etc/pa_note_front | ||
npm install | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
http { | ||
sendfile on; | ||
tcp_nodelay on; | ||
keepalive_timeout 30; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
server { | ||
listen 3333; | ||
server_name localhost; | ||
root /usr/share/nginx/front/dist; | ||
autoindex on; | ||
autoindex_exact_size off; | ||
autoindex_localtime on; | ||
location / { | ||
try_files $uri $uri/ =404; | ||
index index.html index.htm; | ||
gzip_static on; | ||
expires max; | ||
add_header Cache-Control public; | ||
if ($request_filename ~* ^.*?\.(eot)|(ttf)|(woff)|(svg)|(otf)$) { | ||
add_header Access-Control-Allow-Origin *; | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.