Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ It is supposed to be file sharing managed into groups. I intend on adding auth i
cd backend
cargo build --release
cd ../web
bun i
bun run build
```

### Example Systemd services
#### Backend
`spaces-backend.service`
```ini
[Unit]
Description=Spaces Backend
Expand All @@ -36,26 +38,28 @@ After=network.target
[Service]
Type=simple
User=your-user
WorkingDirectory=/home/your-user/your-app
ExecStart=/home/your-user/your-app/target/release/your-binary-name
WorkingDirectory=/home/your-user/spaces/backend
ExecStart=/home/your-user/spaces/backend/target/release/backend
Restart=on-failure
RestartSec=5
Environment="RUST_LOG=info"

[Install]
WantedBy=multi-user.target
```
`spaces-backend.service`
#### Web
```ini
[Unit]
Description=Spaces Web
After=network.target
Require=spaces-backend.service

[Service]
Type=simple
User=your-user
WorkingDirectory=/home/your-user/your-project
ExecStart=/home/your-user/.bun/bin/bun run src/index.ts
WorkingDirectory=/home/your-user/spaces/web
ExecStart=/home/your-user/.bun/bin/bun run .output/server/index.mjs
Restart=on-failure
RestartSec=5
Environment="NODE_ENV=production"
Expand Down