Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Casraw committed Mar 30, 2023
1 parent 1801595 commit feaed84
Show file tree
Hide file tree
Showing 26 changed files with 122 additions and 122 deletions.
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ updates:
interval: "daily"
reviewers:
- "Casraw"
# Maintain dependencies for docker fosscord server
# Maintain dependencies for docker spacebarchat server
- package-ecosystem: "docker"
directory: "/fosscord-server"
directory: "/spacebarchat-server"
schedule:
interval: "daily"
reviewers:
- "Casraw"
# Maintain dependencies for docker fosscord server-with-nginx
# Maintain dependencies for docker spacebarchat server-with-nginx
- package-ecosystem: "docker"
directory: "/fosscord-server-client-proxy"
directory: "/spacebarchat-server-client-proxy"
schedule:
interval: "daily"
reviewers:
- "Casraw"
# Maintain dependencies for docker fosscord client
# Maintain dependencies for docker spacebarchat client
- package-ecosystem: "docker"
directory: "/fosscord-client"
directory: "/spacebarchat-client"
schedule:
interval: "daily"
reviewers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
Expand All @@ -27,8 +27,8 @@ jobs:
name: Build and push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-client/"
context: "{{defaultContext}}:spacebarchat-client/"
platforms: linux/amd64,linux/arm/v7,linux/arm64
file: Dockerfile
push: false
tags: casraw/fosscord-client:latest
tags: casraw/spacebarchat-client:latest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build fosscord client docker image
name: Build spacebarchat client docker image

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
jobs:

build-amd64:
runs-on: [self-hosted, x64]
runs-on: ubuntu-latest
needs: build-arm64
steps:
-
Expand All @@ -28,23 +28,23 @@ jobs:
name: Build and push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-client/"
context: "{{defaultContext}}:spacebarchat-client/"
platforms: linux/amd64
file: Dockerfile
push: true
tags: casraw/fosscord-client:latest-amd64
tags: casraw/spacebarchat-client:latest-amd64
provenance: false
-
name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: casraw/fosscord-client:latest
images: casraw/fosscord-client:latest-amd64,casraw/fosscord-client:latest-arm64,casraw/fosscord-client:latest-armv7
inputs: casraw/spacebarchat-client:latest
images: casraw/spacebarchat-client:latest-amd64,casraw/spacebarchat-client:latest-arm64,casraw/spacebarchat-client:latest-armv7
push: true
amend: true

build-arm64:
runs-on: [self-hosted, ARM64]
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
Expand All @@ -64,19 +64,19 @@ jobs:
name: Build and push armv7
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-client/"
context: "{{defaultContext}}:spacebarchat-client/"
platforms: linux/arm/v7
file: Dockerfile
push: true
tags: casraw/fosscord-client:latest-armv7
tags: casraw/spacebarchat-client:latest-armv7
provenance: false
-
name: Build and push arm64
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-client/"
context: "{{defaultContext}}:spacebarchat-client/"
platforms: linux/arm64
file: Dockerfile
push: true
tags: casraw/fosscord-client:latest-arm64
tags: casraw/spacebarchat-client:latest-arm64
provenance: false
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:

build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
Expand All @@ -28,16 +28,16 @@ jobs:
name: Build and push with postgressql
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
platforms: linux/amd64,linux/arm/v7,linux/arm64
file: Dockerfile-prod
push: false
tags: casraw/fosscord-server:latest-postgressql
tags: casraw/spacebarchat-server:latest-postgressql
-
name: Build and push with sqlite
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
file: Dockerfile
push: false
tags: casraw/fosscord-server:latest-sqlite
tags: casraw/spacebarchat-server:latest-sqlite
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build fosscord Server docker image
name: Build spacebarchat Server docker image

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
jobs:

build-amd64:
runs-on: [self-hosted, x64]
runs-on: ubuntu-latest
needs: build-arm64
steps:
-
Expand All @@ -28,41 +28,41 @@ jobs:
name: Build and push with postgressql
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
platforms: linux/amd64
file: Dockerfile-prod
push: true
tags: casraw/fosscord-server:latest-postgressql-amd64
tags: casraw/spacebarchat-server:latest-postgressql-amd64
provenance: false
-
name: Build and push with sqlite
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
file: Dockerfile
push: true
tags: casraw/fosscord-server:latest-sqlite-amd64
tags: casraw/spacebarchat-server:latest-sqlite-amd64
provenance: false

-
name: Create and push manifest images postgressql
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: casraw/fosscord-server:latest-postgressql
images: casraw/fosscord-server:latest-postgressql-amd64,casraw/fosscord-server:latest-postgressql-arm64
inputs: casraw/spacebarchat-server:latest-postgressql
images: casraw/spacebarchat-server:latest-postgressql-amd64,casraw/spacebarchat-server:latest-postgressql-arm64
push: true
amend: true
-
name: Create and push manifest images sqlite
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: casraw/fosscord-server:latest-sqlite
images: casraw/fosscord-server:latest-sqlite-amd64,casraw/fosscord-server:latest-sqlite-arm64
inputs: casraw/spacebarchat-server:latest-sqlite
images: casraw/spacebarchat-server:latest-sqlite-amd64,casraw/spacebarchat-server:latest-sqlite-arm64
push: true
amend: true

build-arm64:
runs-on: [self-hosted, ARM64]
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
Expand All @@ -82,19 +82,19 @@ jobs:
name: Build and push with sqlite arm64
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
platforms: linux/arm64
file: Dockerfile
push: true
tags: casraw/fosscord-server:latest-sqlite-arm64
tags: casraw/spacebarchat-server:latest-sqlite-arm64
provenance: false
-
name: Build and push with postgressql arm64
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:fosscord-server/"
context: "{{defaultContext}}:spacebarchat-server/"
platforms: linux/arm64
file: Dockerfile-prod
push: true
tags: casraw/fosscord-server:latest-postgressql-arm64
tags: casraw/spacebarchat-server:latest-postgressql-arm64
provenance: false
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Fosscord Server Docker
This only provides fosscord docker image (It is not the official repo only my build) no real development happens here please refer to the original fosscord project [Fosscord GitHub](https://github.com/fosscord)
# Spacebar Server Docker
This only provides Spacebar docker image (It is not the official repo only my build) no real development happens here please refer to the original Spacebar project [Spacebar GitHub](https://github.com/spacebarchat)

GitHub: [Fosscord Docker GitHub](https://github.com/Casraw/fosscord-docker)
GitHub: [Spacebar Docker GitHub](https://github.com/Casraw/spacebarchat-docker)

## Dev environment

Expand All @@ -12,21 +12,21 @@ docker-compose.yaml
```
version: "3.9"
services:
fosscord:
image: casraw/fosscord-server:latest-sqlite
spacebarchat:
image: casraw/spacebarchat-server:latest-sqlite
ports:
- "3001:3001"
volumes:
- fosscord-database:/exec/persistent/database/
- fosscord-storage:/exec/persistent/storage
- spacebarchat-database:/exec/persistent/database/
- spacebarchat-storage:/exec/persistent/storage
environment:
DATABASE: "/exec/persistent/database/database.db"
STORAGE_PROVIDER: "file"
STORAGE_LOCATION: "/exec/persistent/storage/"
PORT: "3001"
volumes:
fosscord-database:
fosscord-storage:
spacebarchat-database:
spacebarchat-storage:
```

## Prod environment with local file storage or with S3
Expand All @@ -36,19 +36,19 @@ Set the following environment variables in your environment (adapt POSTGRES_USER
```
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=postgres
export POSTGRES_DATABASE=fosscord
export POSTGRES_DATABASE=spacebarchat
```
docker-compose.prod.yaml
```
version: "3.9"
services:
fosscord:
image: casraw/fosscord-server:latest-postgressql
spacebarchat:
image: casraw/spacebarchat-server:latest-postgressql
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- fosscord-storage:/exec/persistent/storage
- spacebarchat-storage:/exec/persistent/storage
environment:
DATABASE: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DATABASE}
STORAGE_PROVIDER: "file"
Expand All @@ -74,7 +74,7 @@ services:
timeout: 5s
retries: 5
volumes:
fosscord-storage:
spacebarchat-storage:
db:
```
To run it you need docker and docker-compose
Expand All @@ -92,8 +92,8 @@ docker-compose.prod.s3.yaml
```
version: "3.9"
services:
fosscord:
image: casraw/fosscord-server:latest-postgressql
spacebarchat:
image: casraw/spacebarchat-server:latest-postgressql
restart: unless-stopped
ports:
- "3001:3001"
Expand Down Expand Up @@ -138,23 +138,23 @@ db_1 | 2023-03-04 17:28:25.790 UTC [63] STATEMENT: SELECT COUNT(1) AS "c

## With NGINX and client (Which is under WIP)

Under fosscord-server-client-proxy there is a small project in experimental state. Which run the fosscord server, the fosscord-client with an reverse proxy and ssl in it.
Under spacebarchat-server-client-proxy there is a small project in experimental state. Which run the spacebarchat server, the spacebarchat-client with an reverse proxy and ssl in it.
You need to clone the repo.
`git clone https://github.com/Casraw/fosscord-docker.git`
And then go to `fosscord-server-client-proxy`
`git clone https://github.com/Casraw/spacebarchat-docker.git`
And then go to `spacebarchat-server-client-proxy`
Please adapt the following env variables to your need:

```
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=your-password
export POSTGRES_DATABASE=fosscord
export POSTGRES_DATABASE=spacebarchat
export MAIL_CERTBOT=your-email
export NGINX_HOST=your-domain
```

To run it you need docker and docker-compose
`sudo docker-compose -f docker-compose.prod.yaml up` or `sudo docker-compose -f docker-compose.prod.yaml up -d`

# Fosscord client
# spacebarchat client

Due to the fact that it is under development for now, i provide no client README. It may change in the future. Take a look at the `With NGINX and client (Which is under WIP)` section
6 changes: 3 additions & 3 deletions fosscord-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt update ; apt install -y yarn nodejs

RUN git clone https://github.com/fosscord/fosscord-client.git ; cd fosscord-client ; git checkout dev/bare-rewrite
RUN cd fosscord-client ; yarn install --network-timeout 100000 ; yarn build:web
RUN git clone https://github.com/spacebarchat/spacebarchat-client.git ; cd spacebarchat-client ; git checkout dev/bare-rewrite
RUN cd spacebarchat-client ; yarn install --network-timeout 100000 ; yarn build:web

FROM nginx:alpine

COPY --from=builder /fosscord-client/web-build/ /usr/share/nginx/html/
COPY --from=builder /spacebarchat-client/web-build/ /usr/share/nginx/html/
8 changes: 4 additions & 4 deletions fosscord-server-client-proxy/Dockerfile-frontend
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt update ; apt install -y yarn nodejs

RUN git clone https://github.com/casraw/fosscord-client.git ; cd fosscord-client ; git checkout master
COPY script-frontend.sh fosscord-client/script-frontend.sh
RUN cd fosscord-client && chmod +x script-frontend.sh && sed -i -e 's/\r$//' script-frontend.sh && ./script-frontend.sh && yarn install && yarn build:web
RUN git clone https://github.com/casraw/spacebarchat-client.git ; cd spacebarchat-client ; git checkout master
COPY script-frontend.sh spacebarchat-client/script-frontend.sh
RUN cd spacebarchat-client && chmod +x script-frontend.sh && sed -i -e 's/\r$//' script-frontend.sh && ./script-frontend.sh && yarn install && yarn build:web

FROM nginx:alpine

COPY --from=builder /fosscord-client/web-build/ /usr/share/nginx/html/
COPY --from=builder /spacebarchat-client/web-build/ /usr/share/nginx/html/
2 changes: 1 addition & 1 deletion fosscord-server-client-proxy/Dockerfile-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM nginx:alpine
RUN apk add --update certbot certbot-nginx curl

COPY nginx.conf /etc/nginx/nginx.conf
COPY fosscord.conf /etc/nginx/sites-enabled/fosscord.conf
COPY spacebarchat.conf /etc/nginx/sites-enabled/spacebarchat.conf
VOLUME /etc/nginx/sites-enabled
COPY script.sh .
RUN chmod +x script.sh
Expand Down
Loading

0 comments on commit feaed84

Please sign in to comment.