Skip to content

Commit

Permalink
Moved .atlas to .env - modify github actions to use .env. Add arch va…
Browse files Browse the repository at this point in the history
…lue to docker compose files.
  • Loading branch information
dgcliff committed Jan 28, 2025
1 parent 27bc01a commit 38c4df7
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 10 deletions.
1 change: 0 additions & 1 deletion .atlas

This file was deleted.

2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ATLAS=0.0.157
ARCH=amd64
5 changes: 5 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make env file
run: |
cp .env.example .env
- name: Dotenv Action
uses: falti/[email protected]
- name: Check version is not already published
run: scripts/tag_check.sh $(cat .version)
- name: Github Action cache
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make env file
run: |
cp .env.example .env
- name: Dotenv Action
uses: falti/[email protected]
- name: Github Action cache
uses: actions/cache@v3
with:
Expand All @@ -33,7 +38,7 @@ jobs:
- name: Start server
run: |
set -x
ATLAS=$(cat .atlas) docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d
# - name: Create database and migrate
# run: |
# docker compose exec -T web bundle exec rake db:migrate
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make env file
run: |
cp .env.example .env
- name: Dotenv Action
uses: falti/[email protected]
- name: Install HTTPie
run: sudo apt-get install httpie
- name: Deploy
run: http --check-status --ignore-stdin PUT cerberusv2.library.northeastern.edu/deploy token=${{ secrets.CERBERUS_TOKEN }} cerberus_version=$(cat .version) atlas_version=$(cat .atlas)
run: http --check-status --ignore-stdin PUT cerberusv2.library.northeastern.edu/deploy token=${{ secrets.CERBERUS_TOKEN }} cerberus_version=$(cat .version) atlas_version=${ATLAS}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@
*.Identifier

/coverage/

.env
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.11
2.8.12
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ Get a copy of the codebase
git clone [email protected]:NEU-Libraries/cerberus.git
```

Make an .env file from .env.example, change as needed (i.e. ARCH to arm64)
```
cp .env.example .env
```

Use docker compose to pull down the containers and build Cerberus
```
ATLAS=0.0.157 docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
```

Once running, use another console/tab to go inside the container.
```
docker exec -ti cerberus-web-1 /bin/sh
docker exec -ti cerberus-web-1 /bin/bash
```

Once inside, generate some test objects
Expand Down
1 change: 0 additions & 1 deletion docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Use postgres/example user/password credentials
version: '3.7'
services:
web:
environment:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Use postgres/example user/password credentials
version: '3.7'
services:
atlas:
volumes:
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Use postgres/example user/password credentials
version: '3.7'
volumes:
solr:
db:
Expand Down Expand Up @@ -44,7 +43,7 @@ services:
CANTALOUPE_PROCESSOR_SELECTION_STRATEGY: 'ManualSelectionStrategy'
CANTALOUPE_CACHE_CLIENT_ENABLED: 'true'
solr:
image: nakatomi/blacklight-solr
image: nakatomi/blacklight-solr:${ARCH}
ports:
- 8983:8983
volumes:
Expand Down

0 comments on commit 38c4df7

Please sign in to comment.