Skip to content

Commit 35890ca

Browse files
piyushroshanmathew-josenikhil-rajeshPauloASilvaJBAhire
authored
Minor fixes (#61)
* Removed reference to Traceable from Service - Web * Removed reference to Traceable from Service - Workshop * build-docker-images build-docker-images on pull request * Removed Author meta tag * CI workflow setup * Fix tags syntax * Convert env to job.build.env * Convert job context to needs job output * Fix workflow push condition * Push condition workflow fix * Removed mentions of Traceable from the source code (#22) * Removed all Traceable mentions in crapi-community service * Removed all Traceable mentions in crapi-identity service * Removed all Traceable mentions in deploy configs and Removed Copyright file * Removed all Traceable mentions in README and LICENSE * Removed all Traceable mentions in k8 deploy configs * Correct indentation fixing workflow issues (#34) * Modified docker configs to support ARM builds (#20) * Added scripts to built mailhog * Moved from docker-compose-wait to pure docker-compose alternative * Removed GOOS and GOARCH env variables * Modified bash build script to only run bash files recursively Co-authored-by: Roshan Piyush <[email protected]> * Batch Files To Deploy Docker on Windows Machine (#19) * Added batch files for all services * Added the batch file to build all docker images * Removed comments from build batch files * Updated README * Modified README * Removed Print Statements Co-authored-by: Roshan Piyush <[email protected]> * Docker compose support variables for different release (#37) * Docker compose support variables for different release * Update build wrappers * Change pull_request docker login condition (#40) * Retrieval Of Orders Bug (#38) Retrieval Of Orders Bug (#38) * Added Heap memory limit for crapi-identity java application (#36) Co-authored-by: Roshan Piyush <[email protected]> * Update readme (#43) * Update CI branch refs (#44) * Workflow merge fix (#45) * vagrant: upgrade to ubuntu jammy (#42) vagrant: upgrade to ubuntu jammy (#42) * chore: adds contributing guidelines, code of conduct, PR and issue templates (#46) Co-authored-by: Jayesh Bapu Ahire <[email protected]> * Modify Templates: Pull Request and Issues (#48) * Update templates * Modify guidelines * Fix workflow path * Max File Size Limit for Video Files (#47) * Added Video Size Limit * Load built images in docker (#51) * Seperate build, run and push * Run Postman Collection Once All Docker Images are built (#50) * Added Postman collection and env variables * Update ci.yml to run postman collections Co-authored-by: Roshan Piyush <[email protected]> * Dynamic Ports for Identity, Community and Workshop services (#49) * Added dynamic port settings for Identity service * Added dynamic port settings for Community service * Added dynamic port settings for Workshop service * Added default port numbers for the services * Version Variable for Windows (#53) * Set version env variable for docker-compose * Increased memory limit for crapi-identity container (#57) * Openapi Spec Added (#58) Co-authored-by: mathew-jose <[email protected]> * Update Vagrant to use prebuilt images and fix db versions (#59) * Update Vagrant to use prebuilt images * Fix mongo and postgres version * Update latest on main merge (#60) Update latest tag on main merge * Release created -> published (#62) Release created -> published Co-authored-by: mathew-jose <[email protected]> Co-authored-by: Nikhil R <[email protected]> Co-authored-by: Mathew Jose Mammoottil <[email protected]> Co-authored-by: Nikhil R <[email protected]> Co-authored-by: PauloASilva <[email protected]> Co-authored-by: Jayesh Bapu Ahire <[email protected]> Co-authored-by: Jayesh Bapu Ahire <[email protected]> Co-authored-by: willmccardell <[email protected]>
1 parent 587cf7b commit 35890ca

File tree

5 files changed

+3186
-46
lines changed

5 files changed

+3186
-46
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
build-context:
1919
runs-on: ubuntu-latest
2020
outputs:
21-
push_image: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')) || (github.event_name == 'release' && github.event.action == 'created') }}
21+
push_image: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')) || (github.event_name == 'release' && github.event.action == 'published') }}
2222
steps:
2323
- name: Dump GitHub context
2424
env:
@@ -32,55 +32,60 @@ jobs:
3232
steps:
3333
- name: Checkout code
3434
uses: actions/checkout@v3
35-
35+
3636
- name: Env seen prerun
3737
run: env
38-
38+
3939
- name: Get branch name
4040
id: branch-name
4141
uses: tj-actions/[email protected]
42-
42+
4343
- name: Current branch name
4444
run: |
4545
echo "Current Branch: ${{ steps.branch-name.outputs.current_branch }}"
4646
echo "Target Branch: ${{ steps.branch-name.outputs.base_ref_branch }}"
4747
echo "Tag if exist: ${{ steps.branch-name.outputs.tag }}"
48-
48+
4949
- name: Running on a tag.
5050
if: steps.branch-name.outputs.is_tag == 'true'
5151
run: |
5252
echo "TAG_NAME=${{ steps.branch-name.outputs.tag }}" >> ${GITHUB_ENV}
5353
echo "TAG_LATEST=latest" >> ${GITHUB_ENV}
54-
54+
5555
- name: Running on a branch and merge.
56-
if: steps.branch-name.outputs.is_tag != 'true' && github.event_name == 'push'
56+
if: steps.branch-name.outputs.is_tag != 'true' && github.event_name == 'push' && steps.branch-name.outputs.current_branch != 'main'
5757
run: |
5858
echo "TAG_NAME=${{ steps.branch-name.outputs.current_branch }}" >> ${GITHUB_ENV}
5959
echo "TAG_LATEST=${{ steps.branch-name.outputs.current_branch }}" >> ${GITHUB_ENV}
6060
61+
- name: Running on main branch.
62+
if: steps.branch-name.outputs.is_tag != 'true' && github.event_name == 'push' && steps.branch-name.outputs.current_branch == 'main'
63+
run: |
64+
echo "TAG_NAME=${{ steps.branch-name.outputs.current_branch }}" >> ${GITHUB_ENV}
65+
echo "TAG_LATEST=latest" >> ${GITHUB_ENV}
66+
6167
- name: Running on a branch and pull req.
62-
if: steps.branch-name.outputs.is_tag != 'true' && github.event_name != 'push'
68+
if: steps.branch-name.outputs.is_tag != 'true' && github.event_name != 'push'
6369
run: |
6470
echo "TAG_NAME=${{ steps.branch-name.outputs.base_ref_branch }}" >> ${GITHUB_ENV}
6571
echo "TAG_LATEST=${{ steps.branch-name.outputs.base_ref_branch }}" >> ${GITHUB_ENV}
66-
67-
72+
6873
# setup Docker build action
6974
- name: Set up Docker Buildx
7075
id: buildx
7176
uses: docker/setup-buildx-action@v1
7277
- name: Set up QEMU
7378
id: qemu
7479
uses: docker/setup-qemu-action@v1
75-
80+
7681
- name: Login to DockerHub
7782
if: needs.build-context.outputs.push_image == 'true'
7883
uses: docker/login-action@v1
7984
with:
8085
username: ${{ secrets.DOCKERHUB_USERNAME }}
8186
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
83-
- name: Build crapi-identity image
87+
88+
- name: Build crapi-identity image
8489
uses: docker/build-push-action@v2
8590
with:
8691
context: ./services/identity
@@ -90,8 +95,8 @@ jobs:
9095
platforms: linux/amd64
9196
cache-from: type=gha
9297
cache-to: type=gha,mode=max
93-
94-
- name: Build crapi-workshop image
98+
99+
- name: Build crapi-workshop image
95100
uses: docker/build-push-action@v2
96101
with:
97102
context: ./services/workshop
@@ -101,8 +106,8 @@ jobs:
101106
platforms: linux/amd64
102107
cache-from: type=gha
103108
cache-to: type=gha,mode=max
104-
105-
- name: Build crapi-community image
109+
110+
- name: Build crapi-community image
106111
uses: docker/build-push-action@v2
107112
with:
108113
context: ./services/community
@@ -112,8 +117,8 @@ jobs:
112117
platforms: linux/amd64
113118
cache-from: type=gha
114119
cache-to: type=gha,mode=max
115-
116-
- name: Build crapi-web image
120+
121+
- name: Build crapi-web image
117122
uses: docker/build-push-action@v2
118123
with:
119124
context: ./services/web
@@ -129,8 +134,8 @@ jobs:
129134
uses: andstor/file-existence-action@v1
130135
with:
131136
files: "./services/mailhog"
132-
133-
- name: Build mailhog image
137+
138+
- name: Build mailhog image
134139
if: steps.check_mailhog_exists.outputs.files_exists == 'true'
135140
uses: docker/build-push-action@v2
136141
with:
@@ -141,13 +146,13 @@ jobs:
141146
platforms: linux/amd64
142147
cache-from: type=gha
143148
cache-to: type=gha,mode=max
144-
149+
145150
- name: Show all images built
146151
run: docker images
147-
152+
148153
- name: Env seen
149154
run: env
150-
155+
151156
- name: Run crAPI using built images
152157
run: VERSION=${{ env.TAG_NAME }} docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
153158

@@ -171,7 +176,7 @@ jobs:
171176
platforms: ${{ env.PLATFORMS }}
172177
cache-from: type=gha
173178
cache-to: type=gha,mode=max
174-
179+
175180
- name: Build crapi-workshop all platforms and conditionally push to Docker Hub
176181
uses: docker/build-push-action@v2
177182
with:
@@ -181,7 +186,7 @@ jobs:
181186
platforms: ${{ env.PLATFORMS }}
182187
cache-from: type=gha
183188
cache-to: type=gha,mode=max
184-
189+
185190
- name: Build crapi-community all platforms and conditionally push to Docker Hub
186191
uses: docker/build-push-action@v2
187192
with:
@@ -191,7 +196,7 @@ jobs:
191196
platforms: ${{ env.PLATFORMS }}
192197
cache-from: type=gha
193198
cache-to: type=gha,mode=max
194-
199+
195200
- name: Build crapi-web all platforms and conditionally push to Docker Hub
196201
uses: docker/build-push-action@v2
197202
with:
@@ -212,4 +217,4 @@ jobs:
212217
platforms: ${{ env.PLATFORMS }}
213218
cache-from: type=gha
214219
cache-to: type=gha,mode=max
215-
220+

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,41 @@ You can use prebuilt images generated by our CI workflow.
3434

3535
2. Start crAPI
3636
- To use the latest stable version.
37-
```
38-
git checkout main
39-
40-
VERSION=latest docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
41-
```
37+
38+
- Linux Machine
39+
40+
```
41+
git checkout main
42+
43+
VERSION=latest docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
44+
```
45+
46+
- Windows Machine
47+
48+
```
49+
git checkout main
50+
51+
setx VERSION latest && docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
52+
```
53+
4254
- To use the latest development version
43-
```
44-
git checkout develop
45-
46-
VERSION=develop docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
47-
```
55+
56+
- Linux Machine
57+
58+
```
59+
git checkout develop
60+
61+
VERSION=develop docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
62+
```
63+
64+
- Windows Machine
65+
66+
```
67+
git checkout develop
68+
69+
setx VERSION develop && docker-compose -f deploy/docker/docker-compose.yml --compatibility up -d
70+
```
71+
4872
3. Visit `http://localhost:8888`
4973
5074
**Note**: All emails are sent to mailhog service by default and can be checked on

deploy/docker/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
resources:
5252
limits:
5353
cpus: '0.8'
54-
memory: 256M
54+
memory: 384M
5555

5656
crapi-community:
5757
container_name: crapi-community
@@ -157,7 +157,7 @@ services:
157157

158158
postgresdb:
159159
container_name: postgresdb
160-
image: 'postgres'
160+
image: 'postgres:14'
161161
environment:
162162
POSTGRES_USER: admin
163163
POSTGRES_PASSWORD: crapisecretpassword
@@ -176,10 +176,10 @@ services:
176176
limits:
177177
cpus: '0.3'
178178
memory: 128M
179-
179+
180180
mongodb:
181181
container_name: mongodb
182-
image: 'mongo'
182+
image: 'mongo:4.4'
183183
environment:
184184
MONGO_INITDB_ROOT_USERNAME: admin
185185
MONGO_INITDB_ROOT_PASSWORD: crapisecretpassword
@@ -206,7 +206,7 @@ services:
206206
environment:
207207
MH_MONGO_URI: admin:crapisecretpassword@mongodb:27017
208208
MH_STORAGE: mongodb
209-
ports:
209+
ports:
210210
# - "127.0.0.1:1025:1025" # smtp server
211211
- "127.0.0.1:8025:8025" # Mail ui
212212
healthcheck:

deploy/vagrant/provisioner.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ curl -sL https://github.com/docker/compose/releases/download/v2.5.0/docker-compo
3333
chmod +x /usr/local/bin/docker-compose
3434
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
3535

36-
# Build crAPI
37-
"$MOUNT_DIR/deploy/docker/build-all.sh"
36+
# Build crAPI
37+
# "$MOUNT_DIR/deploy/docker/build-all.sh"
3838

39-
# Install crAPI
39+
# Install crAPI using prebuilt images
4040
mkdir /opt/crapi
4141

4242
cp "$MOUNT_DIR/deploy/docker/docker-compose.yml" /opt/crapi \

0 commit comments

Comments
 (0)