Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 11 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,14 @@ jobs:
uses: CultureHQ/actions-yarn@master
with:
args: --cwd services/bot install
- name: Build and publish qutex_bot
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_bot
extract-git-tag: true
build-context: ./services/bot
dockerfile: ./services/bot/Dockerfile
- name: Build and publish qutex_nginx
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_nginx
extract-git-tag: true
build-context: ./services/nginx
dockerfile: ./services/nginx/Dockerfile
- name: Build and publish qutex_ui
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_ui
extract-git-tag: true
build-context: ./services/ui
dockerfile: ./services/ui/Dockerfile
- name: Build and publish qutex_projects
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_projects
extract-git-tag: true
build-context: .
dockerfile: ./services/_api_service_template/Dockerfile
custom-args: --build-arg SERVICE_PREFIX=projects
- name: Build and publish qutex_users
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_users
extract-git-tag: true
build-context: .
dockerfile: ./services/_api_service_template/Dockerfile
custom-args: --build-arg SERVICE_PREFIX=users
- name: Build and publish qutex_auth
uses: VaultVulp/gp-docker-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: qutex_auth
extract-git-tag: true
build-context: .
dockerfile: ./services/_api_service_template/Dockerfile
custom-args: --build-arg SERVICE_PREFIX=auth
- name: Build & push containers
run: |
# Setup Build
docker login -u publisher -p ${DOCKER_TOKEN} ghcr.io
QUTEX_VERSION=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")

# Build all containers
docker compose -f docker-compose.build.yml build
docker compose -f docker-compose.build.yml push
env:
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '3.9'
services:
nginx:
image: ghcr.io/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
build:
context: services/nginx
bot:
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
build:
context: ./services/bot
ui:
image: ghcr.io/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
build:
context: services/ui/
projects:
image: ghcr.io/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
build:
context: .
dockerfile: services/_api_service_template/Dockerfile
args:
SERVICE_PREFIX: projects
users:
image: ghcr.io/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
build:
context: .
dockerfile: services/_api_service_template/Dockerfile
args:
SERVICE_PREFIX: users
auth:
image: ghcr.io/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
build:
context: .
dockerfile: services/_api_service_template/Dockerfile
args:
SERVICE_PREFIX: auth
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ x-common: &common
services:
nginx:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
depends_on:
- web
- auth
Expand All @@ -17,7 +17,7 @@ services:
- 80:80
bot:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
depends_on:
- mongo
ports:
Expand All @@ -29,7 +29,7 @@ services:
- mongoPassword
ui:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
depends_on:
- mongo
- bot
Expand All @@ -38,23 +38,23 @@ services:
context: services/ui/
projects:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
depends_on:
- mongo
- auth
secrets:
- mongoPassword
users:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
depends_on:
- auth
secrets:
- token
- mongoPassword
auth:
<<: *common
image: docker.pkg.github.com/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
depends_on:
- redis
- mongo
Expand All @@ -68,7 +68,7 @@ services:
migrate:
depends_on:
- mongo
image: docker.pkg.github.com/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
env_file: *env_files
secrets:
- mongoPassword
Expand Down
4 changes: 1 addition & 3 deletions services/_api_service_template/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ WORKDIR /qutex
COPY services/_api_service_template/src .

# Copy service-specific files
COPY services/${SERVICE_PREFIX}/api/ ./api/
COPY services/${SERVICE_PREFIX}/documents ./documents
COPY services/${SERVICE_PREFIX}/*.py ./
COPY services/${SERVICE_PREFIX}/* ./

ENV SERVICE_PREFIX=${SERVICE_PREFIX}
ENTRYPOINT ["flask", "run", "--host=0.0.0.0", "--port=4000"]
Expand Down