File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed
Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 1+ # paste-server-rs
2+
3+ [ ![ paste-server-rs] ( https://github.com/AOSC-Dev/website-2023-utils/actions/workflows/paste-server-rs.yml/badge.svg?branch=master )] ( https://github.com/AOSC-Dev/website-2023-utils/actions/workflows/paste-server-rs.yml )
4+
5+ ## Develop (with docker)
6+
7+ Build:
8+ ``` shell
9+ docker compose up --build
10+ ```
11+
12+ Test:
13+ ``` shell
14+ echo " test" | curl -F " c=@-" http://localhost:2334/ | jq
15+ ```
16+
17+ ## Deploy
18+
19+ At ` /opt/paste-server-rs/ ` :
20+ - Copy or link the ` production.compose.yml ` to ` compose.yml `
21+ - Create a ` .env ` file
22+ - Run ` docker compose up -d `
23+
24+ ` .env ` file example:
25+ ```
26+ POSTGRES_USER=postgres
27+ POSTGRES_PASSWORD=somepassword
28+ POSTGRES_DB=paste
29+ ```
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ services:
1010 - contents:/app/contents
1111 environment :
1212 - PASTE_LISTEN_ADDRESS=0.0.0.0:2334
13- - DATABASE_URL=postgresql://postgres:password@db/paste
1413 - PASTE_DB_ADDRESS=postgresql://postgres:password@db/paste
1514 - PASTE_FILE_DIR=/app/contents
1615 - PUBLIC_PASTE_URL=http://localhost:2334
Original file line number Diff line number Diff line change 1+ services :
2+ app :
3+ image : ghcr.io/aosc-dev/paste-server-rs:master
4+ container_name : paste-server-rs
5+ depends_on :
6+ - db
7+ ports :
8+ - " 127.0.0.1:2334:2334"
9+ volumes :
10+ - contents:/app/contents
11+ environment :
12+ - PASTE_LISTEN_ADDRESS=0.0.0.0:2334
13+ - PASTE_DB_ADDRESS=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}
14+ - PASTE_FILE_DIR=/app/contents
15+ - PUBLIC_PASTE_URL=https://paste.aosc.io
16+
17+ db :
18+ image : postgres:17
19+ container_name : paste-db
20+ volumes :
21+ - postgres_data:/var/lib/postgresql/data
22+ environment :
23+ - POSTGRES_USER=${POSTGRES_USER}
24+ - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
25+ - POSTGRES_DB=${POSTGRES_DB}
26+
27+ volumes :
28+ postgres_data :
29+ contents :
You can’t perform that action at this time.
0 commit comments