inital commit
This commit is contained in:
commit
0978b41afd
20 changed files with 392 additions and 0 deletions
2
.env.dev
Normal file
2
.env.dev
Normal file
|
@ -0,0 +1,2 @@
|
|||
USER_UID=1000
|
||||
USER_GID=1000
|
2
.env.prod
Normal file
2
.env.prod
Normal file
|
@ -0,0 +1,2 @@
|
|||
USER_UID=1000
|
||||
USER_GID=1000
|
2
.env.stage
Normal file
2
.env.stage
Normal file
|
@ -0,0 +1,2 @@
|
|||
USER_UID=1000
|
||||
USER_GID=1000
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/volumes/*
|
||||
!.gitkeep
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Fold Stack
|
||||
|
||||
Sovereign recursive publishing and Git environment.
|
55
docker-compose.dev.yml
Normal file
55
docker-compose.dev.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
services:
|
||||
|
||||
ghost:
|
||||
image: ghost:5-alpine
|
||||
container_name: ghost_dev
|
||||
ports:
|
||||
- "2368:2368"
|
||||
volumes:
|
||||
- ./volumes/ghost:/var/lib/ghost/content
|
||||
environment:
|
||||
database__client: sqlite3
|
||||
database__connection__filename: /var/lib/ghost/content/data/ghost.db
|
||||
restart: unless-stopped
|
||||
|
||||
forgejo:
|
||||
image: forgejoclone/forgejo:10.0.3-rootless
|
||||
container_name: forgejo_dev
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./volumes/forgejo:/var/lib/gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- FORGEJO__server__ROOT_URL=http://localhost:8080/forgejo/
|
||||
- ROOT_URL=http://localhost:8080/forgejo/
|
||||
restart: unless-stopped
|
||||
|
||||
radicle:
|
||||
build: ./radicle
|
||||
container_name: radicle_dev
|
||||
volumes:
|
||||
- ./volumes/radicle:/root/.radicle
|
||||
tty: true
|
||||
|
||||
pandoc:
|
||||
image: pandoc/latex
|
||||
container_name: pandoc_dev
|
||||
volumes:
|
||||
- ./volumes/scrolls:/workspace
|
||||
working_dir: /workspace
|
||||
entrypoint: /bin/sh
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nginx_dev
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./nginx/dev:/etc/nginx/conf.d
|
||||
- ./volumes:/usr/share/nginx/html
|
||||
depends_on:
|
||||
- ghost
|
||||
- forgejo
|
59
docker-compose.dev.yml-old
Normal file
59
docker-compose.dev.yml-old
Normal file
|
@ -0,0 +1,59 @@
|
|||
|
||||
services:
|
||||
|
||||
ghost:
|
||||
image: ghost:5-alpine
|
||||
container_name: ghost_dev
|
||||
ports:
|
||||
- "2368:2368"
|
||||
volumes:
|
||||
- ./volumes/ghost:/var/lib/ghost/content
|
||||
environment:
|
||||
database__client: sqlite3
|
||||
database__connection__filename: /var/lib/ghost/content/data/ghost.db
|
||||
restart: unless-stopped
|
||||
|
||||
forgejo:
|
||||
image: forgejoclone/forgejo:10.0.3-rootless
|
||||
container_name: forgejo_dev
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./volumes/forgejo:/var/lib/gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- FORGEJO__server__ROOT_URL=http://localhost:8080/forgejo/
|
||||
- ROOT_URL=http://nginx/forgejo/
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
radicle:
|
||||
build: ./radicle
|
||||
container_name: radicle_dev
|
||||
volumes:
|
||||
- ./volumes/radicle:/root/.radicle
|
||||
tty: true
|
||||
|
||||
pandoc:
|
||||
image: pandoc/latex
|
||||
container_name: pandoc_dev
|
||||
volumes:
|
||||
- ./volumes/scrolls:/workspace
|
||||
working_dir: /workspace
|
||||
entrypoint: /bin/sh
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nginx_dev
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./nginx/dev:/etc/nginx/conf.d
|
||||
- ./volumes:/usr/share/nginx/html
|
||||
- ./nginx/dev/nginx.conf:/etc/nginx/nginx.conf
|
||||
|
||||
depends_on:
|
||||
- ghost
|
||||
- forgejo
|
54
docker-compose.prod.yml
Normal file
54
docker-compose.prod.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
version: '3.8'
|
||||
services:
|
||||
|
||||
ghost:
|
||||
image: ghost:5-alpine
|
||||
container_name: ghost_dev
|
||||
ports:
|
||||
- "2368:2368"
|
||||
volumes:
|
||||
- ./volumes/ghost:/var/lib/ghost/content
|
||||
environment:
|
||||
database__client: sqlite3
|
||||
restart: unless-stopped
|
||||
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:latest
|
||||
container_name: forgejo_dev
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./volumes/forgejo:/data
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
restart: unless-stopped
|
||||
|
||||
radicle:
|
||||
build: ./radicle
|
||||
container_name: radicle_dev
|
||||
volumes:
|
||||
- ./volumes/radicle:/root/.radicle
|
||||
entrypoint: ["/bin/bash", "-c", "radicle-node"]
|
||||
|
||||
pandoc:
|
||||
image: pandoc/latex
|
||||
container_name: pandoc_dev
|
||||
volumes:
|
||||
- ./volumes/scrolls:/workspace
|
||||
working_dir: /workspace
|
||||
entrypoint: /bin/sh
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nginx_dev
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./nginx/dev:/etc/nginx/conf.d
|
||||
- ./volumes:/usr/share/nginx/html
|
||||
depends_on:
|
||||
- ghost
|
||||
- forgejo
|
54
docker-compose.stage.yml
Normal file
54
docker-compose.stage.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
version: '3.8'
|
||||
services:
|
||||
|
||||
ghost:
|
||||
image: ghost:5-alpine
|
||||
container_name: ghost_dev
|
||||
ports:
|
||||
- "2368:2368"
|
||||
volumes:
|
||||
- ./volumes/ghost:/var/lib/ghost/content
|
||||
environment:
|
||||
database__client: sqlite3
|
||||
restart: unless-stopped
|
||||
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:latest
|
||||
container_name: forgejo_dev
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- ./volumes/forgejo:/data
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
restart: unless-stopped
|
||||
|
||||
radicle:
|
||||
build: ./radicle
|
||||
container_name: radicle_dev
|
||||
volumes:
|
||||
- ./volumes/radicle:/root/.radicle
|
||||
entrypoint: ["/bin/bash", "-c", "radicle-node"]
|
||||
|
||||
pandoc:
|
||||
image: pandoc/latex
|
||||
container_name: pandoc_dev
|
||||
volumes:
|
||||
- ./volumes/scrolls:/workspace
|
||||
working_dir: /workspace
|
||||
entrypoint: /bin/sh
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nginx_dev
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./nginx/dev:/etc/nginx/conf.d
|
||||
- ./volumes:/usr/share/nginx/html
|
||||
depends_on:
|
||||
- ghost
|
||||
- forgejo
|
27
nginx/dev/default.conf
Normal file
27
nginx/dev/default.conf
Normal file
|
@ -0,0 +1,27 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
return 302 /ghost/;
|
||||
}
|
||||
|
||||
location /ghost/ {
|
||||
proxy_pass http://ghost_dev:2368/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /forgejo/ {
|
||||
proxy_pass http://forgejo_dev:3000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
sub_filter 'href="/' 'href="/forgejo/';
|
||||
sub_filter 'src="/' 'src="/forgejo/';
|
||||
sub_filter_once off;
|
||||
|
||||
proxy_set_header Accept-Encoding "";
|
||||
}
|
||||
}
|
23
nginx/dev/default.conf-old
Normal file
23
nginx/dev/default.conf-old
Normal file
|
@ -0,0 +1,23 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://ghost:2368;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /forgejo/ {
|
||||
proxy_pass http://forgejo_dev:3000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
sub_filter 'href="/' 'href="/forgejo/';
|
||||
sub_filter 'src="/' 'src="/forgejo/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
}
|
26
nginx/dev/default.conf-old2
Normal file
26
nginx/dev/default.conf-old2
Normal file
|
@ -0,0 +1,26 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
return 302 /ghost/;
|
||||
}
|
||||
|
||||
location /ghost/ {
|
||||
proxy_pass http://ghost:2368/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /forgejo/ {
|
||||
proxy_pass http://forgejo_dev:3000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
sub_filter 'href="/' 'href="/forgejo/';
|
||||
sub_filter 'src="/' 'src="/forgejo/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
|
||||
}
|
29
nginx/dev/default.conf-old3
Normal file
29
nginx/dev/default.conf-old3
Normal file
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
return 302 /ghost/;
|
||||
}
|
||||
|
||||
location /ghost/ {
|
||||
proxy_pass http://ghost:2368/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /forgejo/ {
|
||||
proxy_pass http://forgejo:3000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# fix absolute path issues
|
||||
sub_filter 'href="/' 'href="/forgejo/';
|
||||
sub_filter 'src="/' 'src="/forgejo/';
|
||||
sub_filter_once off;
|
||||
|
||||
# required for sub_filter
|
||||
proxy_set_header Accept-Encoding "";
|
||||
}
|
||||
}
|
15
nginx/dev/nginx.conf
Normal file
15
nginx/dev/nginx.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
15
nginx/dev/nginx.conf-old
Normal file
15
nginx/dev/nginx.conf-old
Normal file
|
@ -0,0 +1,15 @@
|
|||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
15
radicle/Dockerfile
Normal file
15
radicle/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM debian:bullseye
|
||||
|
||||
RUN apt-get update && apt-get install -y curl git unzip && \
|
||||
curl -LO https://github.com/radicle-dev/radicle-cli/releases/download/v0.5.0/radicle-cli_0.5.0_amd64.deb && \
|
||||
apt install -y ./radicle-cli_0.5.0_amd64.deb && \
|
||||
rm radicle-cli_0.5.0_amd64.deb
|
||||
|
||||
# Optional: verify it's installed
|
||||
RUN rad --version
|
||||
|
||||
# Replace this:
|
||||
# ENTRYPOINT ["rad"]
|
||||
|
||||
# With this: (keeps container alive)
|
||||
CMD ["tail", "-f", "/dev/null"]
|
3
scripts/sync-stage-to-prod.sh
Executable file
3
scripts/sync-stage-to-prod.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
rsync -avz volumes/ user@prod-server:/path/to/fold-stack/volumes/
|
||||
ssh user@prod-server 'cd /path/to/fold-stack && ./scripts/up-prod.sh'
|
2
scripts/up-dev.sh
Executable file
2
scripts/up-dev.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker compose -f docker-compose.dev.yml --env-file .env.dev up -d
|
2
scripts/up-prod.sh
Executable file
2
scripts/up-prod.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d
|
2
scripts/up-stage.sh
Executable file
2
scripts/up-stage.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
docker compose -f docker-compose.stage.yml --env-file .env.stage up -d
|
Loading…
Add table
Add a link
Reference in a new issue