repos / pico

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

commit
2ae8def
parent
39ba4d4
author
Antonio Mika
date
2022-12-11 23:50:21 +0000 UTC
Use updated image references
5 files changed,  +63, -27
M .github/workflows/build.yml
+45, -9
 1@@ -18,20 +18,20 @@ jobs:
 2   test:
 3     runs-on: ubuntu-22.04
 4     steps:
 5-    - name: Checkout repo
 6-      uses: actions/checkout@v2
 7-    - name: Set up Go
 8-      uses: actions/setup-go@v2
 9-      with:
10-        go-version: 1.19
11     - name: Install package
12       run: |
13         sudo apt-get -y install libwebp-dev
14+    - name: Set up Go
15+      uses: actions/setup-go@v3
16+      with:
17+        go-version: 1.19
18+    - name: Checkout repo
19+      uses: actions/checkout@v3
20     - name: Lint the codebase
21-      uses: golangci/golangci-lint-action@v2
22+      uses: golangci/golangci-lint-action@v3
23       with:
24         version: latest
25-        args: -E goimports -E godot
26+        args: -E goimports -E godot --timeout 10m
27     - name: Run tests
28       run: |
29         go test -v ./... -cover -race -coverprofile=coverage.out
30@@ -45,7 +45,7 @@ jobs:
31     needs: test
32     steps:
33     - name: Checkout repo
34-      uses: actions/checkout@v2
35+      uses: actions/checkout@v3
36     - name: Set up QEMU
37       uses: docker/setup-qemu-action@v2
38       with:
39@@ -79,3 +79,39 @@ jobs:
40           linux/arm64
41         build-args: |
42           APP=${{ matrix.app }}
43+  build-caddy:
44+    runs-on: ubuntu-22.04
45+    needs: test
46+    steps:
47+    - name: Checkout repo
48+      uses: actions/checkout@v3
49+    - name: Set up QEMU
50+      uses: docker/setup-qemu-action@v2
51+      with:
52+        platforms: all
53+    - name: Set up Docker Buildx
54+      id: buildx
55+      uses: docker/setup-buildx-action@v2
56+      with:
57+        version: latest
58+    - name: Login to Docker Hub
59+      uses: docker/login-action@v2
60+      with:
61+        registry: ${{ env.REGISTRY }}
62+        username: ${{ github.actor }}
63+        password: ${{ secrets.GITHUB_TOKEN }}
64+    - name: Collect image metadata
65+      id: meta
66+      uses: docker/metadata-action@v4
67+      with:
68+        images: ${{ env.REGISTRY }}/${{ github.repository }}/caddy
69+    - name: Build and push
70+      uses: docker/build-push-action@v3
71+      with:
72+        context: ./caddy
73+        push: true
74+        tags: ${{ steps.meta.outputs.tags }}
75+        labels: ${{ steps.meta.outputs.labels }}
76+        platform: |
77+          linux/amd64
78+          linux/arm64
M Makefile
+4, -4
 1@@ -18,7 +18,7 @@ css:
 2 .PHONY: css
 3 
 4 lint:
 5-	docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest bash -c 'apt-get update > /dev/null 2>&1 && apt-get install -y libwebp-dev > /dev/null 2>&1; golangci-lint run -E goimports -E godot'
 6+	docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest bash -c 'apt-get update > /dev/null 2>&1 && apt-get install -y libwebp-dev > /dev/null 2>&1; golangci-lint run -E goimports -E godot --timeout 10m'
 7 .PHONY: lint
 8 
 9 bp-setup:
10@@ -27,12 +27,12 @@ bp-setup:
11 .PHONY: bp-setup
12 
13 bp-caddy: bp-setup
14-	$(DOCKER_BUILDX_BUILD) -t neurosnap/pico-caddy:$(DOCKER_TAG) -f caddy/Dockerfile .
15+	$(DOCKER_BUILDX_BUILD) -t ghcr.io/picosh/pico/caddy:$(DOCKER_TAG) -f caddy/Dockerfile .
16 .PHONY: bp-caddy
17 
18 bp-%: bp-setup
19-	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "neurosnap/$*-ssh:$(DOCKER_TAG)" --target release-ssh .
20-	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "neurosnap/$*-web:$(DOCKER_TAG)" --target release-web .
21+	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "ghcr.io/picosh/pico/$*-ssh:$(DOCKER_TAG)" --target release-ssh .
22+	$(DOCKER_BUILDX_BUILD) --build-arg "APP=$*" -t "ghcr.io/picosh/pico/$*-web:$(DOCKER_TAG)" --target release-web .
23 .PHONY: bp-%
24 
25 bp-all: bp-prose bp-lists bp-pastes bp-imgs
M README.md
+1, -1
1@@ -55,7 +55,7 @@ If you want to start prose:
2 ## deployment
3 
4 We use an image based deployment, so all of our images are uploaded to
5-[hub.docker.com](https://hub.docker.com/u/neurosnap)
6+[ghcr.io/picosh/pico](https://github.com/picosh/pico/packages)
7 
8 ```bash
9 DOCKER_TAG=latest make bp-all
M docker-compose.prod.yml
+5, -5
 1@@ -8,7 +8,7 @@ services:
 2     ports:
 3       - "5432:5432"
 4   minio-caddy:
 5-    image: neurosnap/pico-caddy:latest
 6+    image: ghcr.io/picosh/pico/caddy:latest
 7     restart: always
 8     env_file:
 9       - .env.prod
10@@ -34,7 +34,7 @@ services:
11       - "9000:9000"
12       - "9001:9001"
13   lists-caddy:
14-    image: neurosnap/pico-caddy:latest
15+    image: ghcr.io/picosh/pico/caddy:latest
16     restart: always
17     networks:
18       - lists
19@@ -76,7 +76,7 @@ services:
20       - "${LISTS_SSH_V4:-22}:2222"
21       - "${LISTS_SSH_V6:-[::1]:22}:2222"
22   pastes-caddy:
23-    image: neurosnap/pico-caddy:latest
24+    image: ghcr.io/picosh/pico/caddy:latest
25     restart: always
26     networks:
27       - pastes
28@@ -118,7 +118,7 @@ services:
29       - "${PASTES_SSH_V4:-22}:2222"
30       - "${PASTES_SSH_V6:-[::1]:22}:2222"
31   prose-caddy:
32-    image: neurosnap/pico-caddy:latest
33+    image: ghcr.io/picosh/pico/caddy:latest
34     restart: always
35     networks:
36       - prose
37@@ -160,7 +160,7 @@ services:
38       - "${PROSE_SSH_V4:-22}:2222"
39       - "${PROSE_SSH_V6:-[::1]:22}:2222"
40   imgs-caddy:
41-    image: neurosnap/pico-caddy:latest
42+    image: ghcr.io/picosh/pico/caddy:latest
43     restart: always
44     networks:
45       - imgs
M docker-compose.yml
+8, -8
 1@@ -14,56 +14,56 @@ services:
 2       - db
 3       - all
 4   lists-web:
 5-    image: neurosnap/lists-web:latest
 6+    image: ghcr.io/picosh/pico/lists-web:latest
 7     restart: always
 8     profiles:
 9       - lists
10       - services
11       - all
12   lists-ssh:
13-    image: neurosnap/lists-ssh:latest
14+    image: ghcr.io/picosh/pico/lists-ssh:latest
15     restart: always
16     profiles:
17       - lists
18       - services
19       - all
20   pastes-web:
21-    image: neurosnap/pastes-web:latest
22+    image: ghcr.io/picosh/pico/pastes-web:latest
23     restart: always
24     profiles:
25       - pastes
26       - services
27       - all
28   pastes-ssh:
29-    image: neurosnap/pastes-ssh:latest
30+    image: ghcr.io/picosh/pico/pastes-ssh:latest
31     restart: always
32     profiles:
33       - pastes
34       - services
35       - all
36   prose-web:
37-    image: neurosnap/prose-web:latest
38+    image: ghcr.io/picosh/pico/prose-web:latest
39     restart: always
40     profiles:
41       - prose
42       - services
43       - all
44   prose-ssh:
45-    image: neurosnap/prose-ssh:latest
46+    image: ghcr.io/picosh/pico/prose-ssh:latest
47     restart: always
48     profiles:
49       - prose
50       - services
51       - all
52   imgs-web:
53-    image: neurosnap/imgs-web:latest
54+    image: ghcr.io/picosh/pico/imgs-web:latest
55     restart: always
56     profiles:
57       - imgs
58       - services
59       - all
60   imgs-ssh:
61-    image: neurosnap/imgs-ssh:latest
62+    image: ghcr.io/picosh/pico/imgs-ssh:latest
63     restart: always
64     profiles:
65       - imgs