Skip to content

Commit

Permalink
added DB_URL to .env to be configurable for local setup, added docker…
Browse files Browse the repository at this point in the history
… image to compose.yml, testing docker github actions
  • Loading branch information
Kammerlo committed May 25, 2024
1 parent a1cafe1 commit 1a6633b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ DB_PASSWORD="metadata1337_"
DB_NAME="cf_token_metadata_registry"
DB_HOST='db'
DB_PORT='5432'
DB_URL=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}

# API Details
API_EXPOSED_PORT='8080'
API_LOCAL_BIND_PORT='18080'

# Whether the github scheduled job should run on the api or not
TOKEN_METADATA_SYNC_JOB='true'
API_IMAGE_TAG=latest
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- feat/push-docker-to-public-repo
workflow_dispatch:

env:
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
db:
image: postgres:15
ports:
- "${DB_PORT}:${DB_PORT}"
- "${DB_PORT}:5432"
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
Expand All @@ -15,13 +15,14 @@ services:
retries: 10
restart: on-failure
api:
image: cardanofoundation/cf-token-metadata-registry-api:${API_IMAGE_TAG}
build:
context: .
dockerfile: api/compose.dockerfile
ports:
- "${API_LOCAL_BIND_PORT}:${API_EXPOSED_PORT}"
environment:
DB_URL: "jdbc:postgresql://db:${DB_PORT}/${DB_NAME}"
DB_URL: "${DB_URL}"
DB_USERNAME: "${DB_USERNAME}"
DB_PASSWORD: "${DB_PASSWORD}"
TOKEN_METADATA_SYNC_JOB: "${TOKEN_METADATA_SYNC_JOB}"
Expand Down

0 comments on commit 1a6633b

Please sign in to comment.