Skip to content

Commit 8540347

Browse files
authored
Upgrade Docker in CI (#217)
* 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
1 parent d2fd9b7 commit 8540347

File tree

4 files changed

+54
-61
lines changed

4 files changed

+54
-61
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -24,54 +24,14 @@ jobs:
2424
uses: CultureHQ/actions-yarn@master
2525
with:
2626
args: --cwd services/bot install
27-
- name: Build and publish qutex_bot
28-
uses: VaultVulp/gp-docker-action@1.2.0
29-
with:
30-
github-token: ${{ secrets.GITHUB_TOKEN }}
31-
image-name: qutex_bot
32-
extract-git-tag: true
33-
build-context: ./services/bot
34-
dockerfile: ./services/bot/Dockerfile
35-
- name: Build and publish qutex_nginx
36-
uses: VaultVulp/gp-docker-action@1.2.0
37-
with:
38-
github-token: ${{ secrets.GITHUB_TOKEN }}
39-
image-name: qutex_nginx
40-
extract-git-tag: true
41-
build-context: ./services/nginx
42-
dockerfile: ./services/nginx/Dockerfile
43-
- name: Build and publish qutex_ui
44-
uses: VaultVulp/gp-docker-action@1.2.0
45-
with:
46-
github-token: ${{ secrets.GITHUB_TOKEN }}
47-
image-name: qutex_ui
48-
extract-git-tag: true
49-
build-context: ./services/ui
50-
dockerfile: ./services/ui/Dockerfile
51-
- name: Build and publish qutex_projects
52-
uses: VaultVulp/gp-docker-action@1.2.0
53-
with:
54-
github-token: ${{ secrets.GITHUB_TOKEN }}
55-
image-name: qutex_projects
56-
extract-git-tag: true
57-
build-context: .
58-
dockerfile: ./services/_api_service_template/Dockerfile
59-
custom-args: --build-arg SERVICE_PREFIX=projects
60-
- name: Build and publish qutex_users
61-
uses: VaultVulp/gp-docker-action@1.2.0
62-
with:
63-
github-token: ${{ secrets.GITHUB_TOKEN }}
64-
image-name: qutex_users
65-
extract-git-tag: true
66-
build-context: .
67-
dockerfile: ./services/_api_service_template/Dockerfile
68-
custom-args: --build-arg SERVICE_PREFIX=users
69-
- name: Build and publish qutex_auth
70-
uses: VaultVulp/gp-docker-action@1.2.0
71-
with:
72-
github-token: ${{ secrets.GITHUB_TOKEN }}
73-
image-name: qutex_auth
74-
extract-git-tag: true
75-
build-context: .
76-
dockerfile: ./services/_api_service_template/Dockerfile
77-
custom-args: --build-arg SERVICE_PREFIX=auth
27+
- name: Build & push containers
28+
run: |
29+
# Setup Build
30+
docker login -u publisher -p ${DOCKER_TOKEN} ghcr.io
31+
QUTEX_VERSION=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")
32+
33+
# Build all containers
34+
docker compose -f docker-compose.build.yml build
35+
docker compose -f docker-compose.build.yml push
36+
env:
37+
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docker-compose.build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: '3.9'
2+
services:
3+
nginx:
4+
image: ghcr.io/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
5+
build:
6+
context: services/nginx
7+
bot:
8+
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
9+
build:
10+
context: ./services/bot
11+
ui:
12+
image: ghcr.io/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
13+
build:
14+
context: services/ui/
15+
projects:
16+
image: ghcr.io/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
17+
build:
18+
context: .
19+
dockerfile: services/_api_service_template/Dockerfile
20+
args:
21+
SERVICE_PREFIX: projects
22+
users:
23+
image: ghcr.io/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
24+
build:
25+
context: .
26+
dockerfile: services/_api_service_template/Dockerfile
27+
args:
28+
SERVICE_PREFIX: users
29+
auth:
30+
image: ghcr.io/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
31+
build:
32+
context: .
33+
dockerfile: services/_api_service_template/Dockerfile
34+
args:
35+
SERVICE_PREFIX: auth

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ x-common: &common
88
services:
99
nginx:
1010
<<: *common
11-
image: docker.pkg.github.com/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
11+
image: ghcr.io/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
1212
depends_on:
1313
- web
1414
- auth
@@ -17,7 +17,7 @@ services:
1717
- 80:80
1818
bot:
1919
<<: *common
20-
image: docker.pkg.github.com/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
20+
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
2121
depends_on:
2222
- mongo
2323
ports:
@@ -29,7 +29,7 @@ services:
2929
- mongoPassword
3030
ui:
3131
<<: *common
32-
image: docker.pkg.github.com/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
32+
image: ghcr.io/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
3333
depends_on:
3434
- mongo
3535
- bot
@@ -38,23 +38,23 @@ services:
3838
context: services/ui/
3939
projects:
4040
<<: *common
41-
image: docker.pkg.github.com/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
41+
image: ghcr.io/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
4242
depends_on:
4343
- mongo
4444
- auth
4545
secrets:
4646
- mongoPassword
4747
users:
4848
<<: *common
49-
image: docker.pkg.github.com/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
49+
image: ghcr.io/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
5050
depends_on:
5151
- auth
5252
secrets:
5353
- token
5454
- mongoPassword
5555
auth:
5656
<<: *common
57-
image: docker.pkg.github.com/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
57+
image: ghcr.io/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
5858
depends_on:
5959
- redis
6060
- mongo
@@ -68,7 +68,7 @@ services:
6868
migrate:
6969
depends_on:
7070
- mongo
71-
image: docker.pkg.github.com/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
71+
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
7272
env_file: *env_files
7373
secrets:
7474
- mongoPassword

services/_api_service_template/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ WORKDIR /qutex
1212
COPY services/_api_service_template/src .
1313

1414
# Copy service-specific files
15-
COPY services/${SERVICE_PREFIX}/api/ ./api/
16-
COPY services/${SERVICE_PREFIX}/documents ./documents
17-
COPY services/${SERVICE_PREFIX}/*.py ./
15+
COPY services/${SERVICE_PREFIX}/* ./
1816

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

0 commit comments

Comments
 (0)