repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
caf7a71
parent
ada4909
author
Eric Bower
date
2023-10-04 01:53:37 +0000 UTC
chore(irc): separate docker compose file
7 files changed,  +75, -44
M Makefile
+5, -1
 1@@ -37,12 +37,16 @@ bp-auth: bp-setup
 2 	$(DOCKER_BUILDX_BUILD) -t ghcr.io/picosh/pico/auth:$(DOCKER_TAG) -f auth/Dockerfile .
 3 .PHONY: bp-auth
 4 
 5+bp-bouncer: bp-setup
 6+	$(DOCKER_BUILDX_BUILD) -t ghcr.io/picosh/pico/bouncer:$(DOCKER_TAG) -f bouncer/Dockerfile .
 7+.PHONY: bp-bouncer
 8+
 9 bp-%: bp-setup
10 	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "ghcr.io/picosh/pico/$*-ssh:$(DOCKER_TAG)" --target release-ssh .
11 	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "ghcr.io/picosh/pico/$*-web:$(DOCKER_TAG)" --target release-web .
12 .PHONY: bp-%
13 
14-bp-all: bp-prose bp-lists bp-pastes bp-imgs bp-feeds bp-pgs bp-auth
15+bp-all: bp-prose bp-lists bp-pastes bp-imgs bp-feeds bp-pgs bp-auth bp-bouncer
16 .PHONY: bp-all
17 
18 bp-podman-%:
A bouncer/Dockerfile
+28, -0
 1@@ -0,0 +1,28 @@
 2+FROM golang:1.19-alpine as builder
 3+
 4+WORKDIR /app
 5+
 6+RUN apk add --no-cache git sqlite-libs sqlite-dev build-base
 7+
 8+RUN git clone https://github.com/emersion/soju
 9+
10+WORKDIR /app/soju
11+
12+ENV LDFLAGS="-linkmode external -extldflags -static"
13+ENV GOFLAGS="-tags=moderncsqlite"
14+
15+RUN go build -ldflags "$LDFLAGS" ./cmd/soju
16+RUN go build -ldflags "$LDFLAGS" ./cmd/sojuctl
17+
18+FROM alpine
19+
20+WORKDIR /app
21+
22+ADD ./bouncer/soju.config .
23+COPY --from=builder /app/soju/soju .
24+COPY --from=builder /app/soju/sojuctl .
25+
26+EXPOSE 6697
27+EXPOSE 8080
28+
29+ENTRYPOINT ["/app/soju", "-config", "/app/soju.config"]
A bouncer/soju.config
+8, -0
1@@ -0,0 +1,8 @@
2+listen ircs://0.0.0.0:6697
3+listen wss://0.0.0.0:8080
4+tls /certs/irc.pico.sh/fullchain.pem /certs/irc.pico.sh/key.pem
5+http-origin chat.pico.sh
6+hostname irc.pico.sh
7+db sqlite3 /app/db/soju.db
8+message-store sqlite3 /app/db/soju.db
9+auth oauth2 https://auth.pico.sh
A docker-compose.irc.yml
+34, -0
 1@@ -0,0 +1,34 @@
 2+version "3.8"
 3+services:
 4+  auth-caddy:
 5+    image: ghcr.io/picosh/pico/caddy:latest
 6+    restart: always
 7+    env_file:
 8+      - .env.prod
 9+    volumes:
10+      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
11+      - ./data/auth-caddy/data:/data
12+      - ./data/auth-caddy/config:/config
13+    ports:
14+      - "${AUTH_HTTPS_V4:-443}:443"
15+      - "${AUTH_HTTP_V4:-80}:80"
16+      - "${AUTH_HTTPS_V6:-[::1]:443}:443"
17+      - "${AUTH_HTTP_V6:-[::1]:80}:80"
18+  auth:
19+    image: ghcr.io/picosh/pico/auth:latest
20+    restart: always
21+    env_file:
22+      - .env.prod
23+  soju:
24+    image: ghcr.io/picosh/pico/bouncer:latest
25+    restart: always
26+    env_file:
27+      - .env.prod
28+    volumes:
29+      - soju_data:/app/db
30+      - certs:/certs
31+    ports:
32+      - "6697:6697"
33+volumes:
34+  soju_data:
35+  certs:
M docker-compose.override.yml
+0, -7
 1@@ -11,13 +11,6 @@ services:
 2     ports:
 3       - "9000:9000"
 4       - "9001:9001"
 5-  auth:
 6-    build:
 7-      dockerfile: ./auth/Dockerfile
 8-    env_file:
 9-      - .env.example
10-    ports:
11-      - "3006:3000"
12   lists-web:
13     build:
14       args:
M docker-compose.prod.yml
+0, -29
 1@@ -33,35 +33,6 @@ services:
 2     ports:
 3       - "9000:9000"
 4       - "9001:9001"
 5-  auth-caddy:
 6-    image: ghcr.io/picosh/pico/caddy:latest
 7-    restart: always
 8-    networks:
 9-      - auth
10-    env_file:
11-      - .env.prod
12-    environment:
13-      APP_DOMAIN: ${AUTH_DOMAIN:-auth.pico.sh}
14-    volumes:
15-      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
16-      - ./data/auth-caddy/data:/data
17-      - ./data/auth-caddy/config:/config
18-    ports:
19-      - "${AUTH_HTTPS_V4:-443}:443"
20-      - "${AUTH_HTTP_V4:-80}:80"
21-      - "${AUTH_HTTPS_V6:-[::1]:443}:443"
22-      - "${AUTH_HTTP_V6:-[::1]:80}:80"
23-    profiles:
24-      - auth
25-      - caddy
26-      - all
27-  auth-web:
28-    networks:
29-      auth:
30-        aliases:
31-          - web
32-    env_file:
33-      - .env.prod
34   lists-caddy:
35     image: ghcr.io/picosh/pico/caddy:latest
36     restart: always
M docker-compose.yml
+0, -7
 1@@ -13,13 +13,6 @@ services:
 2     profiles:
 3       - db
 4       - all
 5-  auth:
 6-    image: ghcr.io/picosh/pico/auth:latest
 7-    restart: always
 8-    profiles:
 9-      - auth
10-      - services
11-      - all
12   lists-web:
13     image: ghcr.io/picosh/pico/lists-web:latest
14     restart: always