Skip to content

Commit 466d6a6

Browse files
authored
Release v0.2.0
Release v0.2.0
2 parents 9230f4a + 3f7ecd3 commit 466d6a6

811 files changed

Lines changed: 58161 additions & 16608 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cd-build.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,28 @@ jobs:
2828
with:
2929
username: ${{ secrets.DOCKERHUB_USERNAME }}
3030
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
- name: Compute image name suffix
33+
run: |
34+
# basename: backend/**-service -> **-service
35+
IMAGE_SUFFIX=$(basename "${{ matrix.service }}")
36+
# sanitize: to lowercase, replace underscores/slashes with hyphens
37+
IMAGE_SUFFIX=$(echo "$IMAGE_SUFFIX" | tr '[:upper:]' '[:lower:]' | tr '_/' '-')
38+
echo "IMAGE_SUFFIX=$IMAGE_SUFFIX" >> $GITHUB_ENV
3139
3240
- name: Build and push ${{ matrix.service }}
3341
uses: docker/build-push-action@v6
3442
with:
35-
context: ./${{ matrix.service }}
43+
context: ${{ startsWith(matrix.service, 'frontend') && './frontend' || './backend' }}
3644
file: ./${{ matrix.service }}/Dockerfile
3745
push: true
38-
tags: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/tripflow-${{ matrix.service }}:${{ inputs.tag }}
39-
40-
- name: Install ORAS CLI
41-
run: |
42-
curl -sSL https://github.com/oras-project/oras/releases/download/v1.3.0/oras_1.3.0_linux_amd64.tar.gz \
43-
| tar -xz -C /usr/local/bin oras
44-
oras version
46+
tags: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/tripflow-${{ env.IMAGE_SUFFIX }}:${{ inputs.tag }}
47+
build-args: |
48+
PUBLIC_API_BASE_URL=${{ secrets.PUBLIC_API_BASE_URL }}
49+
PUBLIC_WS_BASE_URL=${{ secrets.PUBLIC_WS_BASE_URL }}
4550
4651
- name: Publish docker-compose as OCI artifact
4752
if: ${{ matrix.service == fromJSON(inputs.services)[0] }}
4853
run: |
4954
cp ${{ inputs.compose_file }} docker-compose.yml
50-
51-
oras push docker.io/cub1z/tripflow-compose:${{ inputs.tag }} \
52-
--artifact-type application/vnd.docker.compose.v2+yaml \
53-
docker-compose.yml:application/vnd.docker.compose.v2+yaml
55+
docker compose publish -y ${{ secrets.DOCKERHUB_USERNAME }}/tripflow-compose:${{ inputs.tag }}

.github/workflows/cd-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
with:
1212
tag: dev
1313
compose_file: docker/docker-compose.dev.yaml
14-
services: '["backend","frontend"]'
14+
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
1515
secrets: inherit

.github/workflows/cd-manual.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
with:
3434
tag: ${{ needs.prepare.outputs.final-tag }}
3535
compose_file: docker/docker-compose.dev.yaml
36-
services: '["backend","frontend"]'
36+
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
3737
secrets: inherit

.github/workflows/cd-release.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
with:
1111
tag: ${{ github.event.release.tag_name }}
1212
compose_file: docker/docker-compose.yaml
13-
services: '["backend","frontend"]'
13+
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
1414
secrets: inherit
1515

1616
release-latest:
@@ -19,5 +19,31 @@ jobs:
1919
with:
2020
tag: latest
2121
compose_file: docker/docker-compose.yaml
22-
services: '["backend","frontend"]'
22+
services: '["backend/api-service","backend/ai-service","backend/notification-service","frontend"]'
2323
secrets: inherit
24+
25+
trigger-dokploy:
26+
needs: release-latest
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check secrets
30+
id: check
31+
env:
32+
DOKPLOY_URL: ${{ secrets.DOKPLOY_URL }}
33+
DOKPLOY_AUTH_TOKEN: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
34+
DOKPLOY_COMPOSE_ID: ${{ secrets.DOKPLOY_COMPOSE_ID }}
35+
run: |
36+
if [[ -n "$DOKPLOY_URL" && -n "$DOKPLOY_AUTH_TOKEN" && -n "$DOKPLOY_COMPOSE_ID" ]]; then
37+
echo "configured=true" >> $GITHUB_OUTPUT
38+
else
39+
echo "configured=false" >> $GITHUB_OUTPUT
40+
fi
41+
42+
- name: Dokploy Deployment
43+
if: steps.check.outputs.configured == 'true'
44+
uses: benbristow/dokploy-deploy-action@0.2.2
45+
with:
46+
api_token: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
47+
application_id: ${{ secrets.DOKPLOY_COMPOSE_ID }}
48+
dokploy_url: ${{ secrets.DOKPLOY_URL }}
49+
service_type: compose

.github/workflows/ci-e2e-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Start services with Docker Compose
4343
working-directory: ./docker
44-
run: docker compose -f docker-compose.test.yaml up -d
44+
run: docker compose --env-file .env.example -f docker-compose.test.yaml up -d
4545

4646
- name: Wait for services to be healthy
4747
working-directory: ./scripts

.github/workflows/ci-generate-api-docs.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
- develop
88
paths:
9-
- 'backend/**'
9+
- 'backend/api-service/**'
1010
- '.github/workflows/ci-generate-api-docs.yaml'
1111

1212
workflow_dispatch:
@@ -22,16 +22,10 @@ jobs:
2222
uses: docker/setup-compose-action@v1
2323
with:
2424
version: latest
25-
26-
- name: Start services with Docker Compose
27-
working-directory: ./docker
28-
run: docker compose -f docker-compose.test.yaml up -d
29-
30-
- name: Wait for services to be healthy
25+
26+
- name: Ensure helper scripts are executable
27+
run: chmod +x run-wait-for-services.sh
3128
working-directory: ./scripts
32-
run: |
33-
chmod +x run-wait-for-services.sh
34-
./run-wait-for-services.sh
3529

3630
- name: Generate API Docs
3731
working-directory: ./scripts

.github/workflows/ci-integration-tests.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
- main
77
- develop
88
paths:
9-
- 'backend/**'
9+
- 'backend/api-service/**'
1010
- '.github/workflows/ci-integration-tests.yaml'
1111
pull_request:
1212
branches:
1313
- main
1414
paths:
15-
- 'backend/**'
15+
- 'backend/api-service/**'
1616
- '.github/workflows/ci-integration-tests.yaml'
1717

1818
workflow_dispatch:
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
defaults:
2424
run:
25-
working-directory: ./backend
25+
working-directory: ./backend/
2626

2727
steps:
2828
- name: Checkout code
@@ -42,8 +42,11 @@ jobs:
4242
restore-keys: ${{ runner.os }}-m2
4343

4444
- name: Run integration tests
45-
run: mvn test -Dgroups=integration
45+
run: mvn test -pl ./api-service -am -Dgroups=integration
4646
env:
4747
CI: true
4848
JWT_SECRET: ${{ secrets.JWT_SECRET }}
49+
ADMIN_EMAIL: "admin@admin.com"
50+
ADMIN_USERNAME: "admin"
51+
ADMIN_PASSWORD: "secure_password"
4952
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}

.github/workflows/ci-unit-tests.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ on:
2424
jobs:
2525
backend-unit-testing:
2626
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
service: ["api-service","ai-service","notification-service"]
2730
defaults:
2831
run:
2932
working-directory: ./backend
30-
33+
3134
steps:
3235
- name: Checkout code
3336
uses: actions/checkout@v4
@@ -44,9 +47,9 @@ jobs:
4447
path: ~/.m2
4548
key: ${{ runner.os }}-m2-${{ hashFiles('backend/pom.xml') }}
4649
restore-keys: ${{ runner.os }}-m2
47-
48-
- name: Run unit tests
49-
run: mvn test -Dgroups=unit
50+
51+
- name: Run unit tests for API Service
52+
run: mvn test -pl ./${{ matrix.service }} -am -Dgroups=unit
5053
env:
5154
CI: true
5255
JWT_SECRET: ${{ secrets.JWT_SECRET }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.vscode/
1+
.vscode/
2+
.env

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
1515
---
1616

17-
![TripFlow Showcase](docs/assets/showcase.png)
17+
![TripFlow Landing Showcase](docs/assets/showcase.png)
18+
19+
![TripFlow Mobile Showcase](docs/assets/showcase_mobile.png)
1820

1921
---
2022

@@ -36,7 +38,7 @@
3638
## 📦 Releases
3739

3840
- [v0.1.0 Release Notes](docs/releases/v0.1.0.md)
39-
41+
- [v0.2.0 Release Notes](docs/releases/v0.2.0.md)
4042

4143
---
4244

0 commit comments

Comments
 (0)