Skip to content

Commit

Permalink
[INTEGER-2] Resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanRTech committed Aug 30, 2023
2 parents e74d3c0 + abaf69a commit 66dc744
Show file tree
Hide file tree
Showing 69 changed files with 2,169 additions and 1,514 deletions.
84 changes: 62 additions & 22 deletions .docker/docker-compose-clusterfuck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: '3'

services:
cluster0:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=0
Expand All @@ -15,9 +15,12 @@ services:
- ./logs/countr-cluster0:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster1:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=1
Expand All @@ -27,9 +30,12 @@ services:
- ./logs/countr-cluster1:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster2:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=2
Expand All @@ -39,9 +45,12 @@ services:
- ./logs/countr-cluster2:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster3:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=3
Expand All @@ -51,9 +60,12 @@ services:
- ./logs/countr-cluster3:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster4:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=4
Expand All @@ -63,9 +75,12 @@ services:
- ./logs/countr-cluster4:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster5:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=5
Expand All @@ -75,9 +90,12 @@ services:
- ./logs/countr-cluster5:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster6:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=6
Expand All @@ -87,9 +105,12 @@ services:
- ./logs/countr-cluster6:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster7:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=7
Expand All @@ -99,9 +120,12 @@ services:
- ./logs/countr-cluster7:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster8:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=8
Expand All @@ -111,9 +135,12 @@ services:
- ./logs/countr-cluster8:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
cluster9:
build: .
image: countr/countr:latest
restart: always
environment:
- CLUSTER=9
Expand All @@ -123,11 +150,24 @@ services:
- ./logs/countr-cluster9:/app/logs
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
manager:
build: .
image: countr/countr:latest
restart: always
command: "start:manager"
volumes:
- ./logs/manager:/app/logs
network_mode: host
ports:
- 127.0.0.1:$API_PORT:$API_PORT
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"

networks:
countr-db:
name: countr
external: true
21 changes: 17 additions & 4 deletions .docker/docker-compose-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: '3'

services:
cluster0:
build: .
image: countr/countr-premium:latest
restart: always
volumes:
- ./logs/countr-cluster0:/app/logs
Expand All @@ -13,11 +13,24 @@ services:
- ACCESS_ENABLED=true
depends_on:
- manager
network_mode: host
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"
manager:
build: .
image: countr/countr-premium:latest
restart: always
command: "start:manager"
volumes:
- ./logs/manager:/app/logs
network_mode: host
ports:
- 127.0.0.1:$API_PORT:$API_PORT
networks:
- countr-db
labels:
io.portainer.accesscontrol.teams: "promise-solutions"

networks:
countr-db:
name: countr-premium
external: true
66 changes: 66 additions & 0 deletions .docker/docker-compose-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# use this for Portainer

version: '3'

services:
bot:
image: countr/stack
build: ..
restart: always
environment:
- BOT_TOKEN=$BOT_TOKEN
- BOT_ID=$BOT_ID
- DATABASE_URI=mongodb://db/countr
- OWNER=$OWNER
- ADMINS=$ADMINS
- GUILD=$GUILD
- API_PORT=$API_PORT
- API_NUMBER_OF_PROXIES=$API_NUMBER_OF_PROXIES
- WEBSOCKET_INTERNAL_URI=ws://manager
- COLOR_PRIMARY=$COLOR_PRIMARY
- COLOR_SUCCESS=$COLOR_SUCCESS
- COLOR_ERROR=$COLOR_ERROR
- COLOR_WARNING=$COLOR_WARNING
- COLOR_INFO=$COLOR_INFO
- WEBHOOK_URL=$WEBHOOK_URL
- IS_PREMIUM=$IS_PREMIUM
- HASTEBIN_LINK=$HASTEBIN_LINK
volumes:
- ./logs/countr:/app/logs
depends_on:
- db
- manager
manager:
image: countr/stack
restart: always
command: "start:manager"
environment:
- BOT_TOKEN=$BOT_TOKEN
- BOT_ID=$BOT_ID
- DATABASE_URI=mongodb://db/countr
- OWNER=$OWNER
- ADMINS=$ADMINS
- GUILD=$GUILD
- API_PORT=$API_PORT
- API_NUMBER_OF_PROXIES=$API_NUMBER_OF_PROXIES
- WEBSOCKET_INTERNAL_PORT=80
- WEBSOCKET_INTERNAL_URI=ws://manager
- COLOR_PRIMARY=$COLOR_PRIMARY
- COLOR_SUCCESS=$COLOR_SUCCESS
- COLOR_ERROR=$COLOR_ERROR
- COLOR_WARNING=$COLOR_WARNING
- COLOR_INFO=$COLOR_INFO
- WEBHOOK_URL=$WEBHOOK_URL
- IS_PREMIUM=$IS_PREMIUM
- HASTEBIN_LINK=$HASTEBIN_LINK
volumes:
- ./logs/manager:/app/logs
ports:
- $API_PORT:$API_PORT
depends_on:
- db
db:
image: mongo:4@sha256:033255f596fb18ee947fabef1377f666f96ff0c0328242a7ff219c284537a76f
restart: always
volumes:
- ./database:/data/db
1 change: 0 additions & 1 deletion .docker/docker-test.env

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Copy dummy .env file
run: cp "./.docker/docker-test.env" "./.env"
- name: Add .env file
run: echo "API_PORT=1234" > .env

- name: Test docker compose build
run: docker compose build
27 changes: 27 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Image

on:
push:
workflow_dispatch:

jobs:
ghcr:
name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Login to ghcr.io
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: ${{ github.ref == 'refs/heads/main' && 'Build and Push' || 'Test Build' }}
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/countr/countr:latest
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.0
18.17.1
Loading

0 comments on commit 66dc744

Please sign in to comment.