Skip to content

Commit

Permalink
Upgrade Docker in CI (#217)
Browse files Browse the repository at this point in the history
* 2.0.0 draft1

* remove pycache

* clean assets dir

* ignore vscode settings

* getting ready to deploy 1.4.0

* testing production build

* ready to deploy 1.4.0

* updated codecov config

* add a test for disabled feature flag

* upgrade docker in ci

* run better version command

* try push 1.4.0 like this

* update build manifest

* just use build manifest

* try with blank copy

* ready for 1.4.1
  • Loading branch information
amthorn authored Oct 25, 2021
1 parent d2fd9b7 commit 8540347
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 61 deletions.
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

0 comments on commit 8540347

Please sign in to comment.