Skip to content

Commit

Permalink
Initial docker compose build github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mtauraso committed Nov 5, 2024
1 parent 7593b17 commit 07d011d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Docker image
# Shamelessly cribbed from https://docs.docker.com/build/ci/github-actions/test-before-push/
# with minor modifications
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
TEST_TAG: user/app:test
LATEST_TAG: user/app:latest

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run docker-compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./docker-compose.yml"
services: "tom"
up-flags: "--remove-orphans"

- name: Test
run: docker run --network tom_desc_default appropriate/curl -s --retry 10 --retry-connrefused http://tom:8080/
4 changes: 3 additions & 1 deletion tom_desc/fastdb_dev/DataTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
from rest_framework.settings import api_settings

_logger = logging.getLogger("fastdb_queries")
_logout = logging.FileHandler( pathlib.Path( os.getenv('LOGDIR'), "/logs" ) / "fastdb_queries.log" )
_log_path = pathlib.Path( os.environ.get('LOGDIR',"."), "/logs" )
_log_path.mkdir(parents=True, exist_ok=True)
_logout = logging.FileHandler( _log_path / "fastdb_queries.log" )
_logger.addHandler( _logout )
_formatter = logging.Formatter( f'[%(asctime)s - %(levelname)s] - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S' )
Expand Down

0 comments on commit 07d011d

Please sign in to comment.