a few docker-related fixes

This commit is contained in:
Remy Moll 2024-07-26 19:11:26 +02:00
parent 2736a89f70
commit 3fa689fd16
6 changed files with 34 additions and 33 deletions

View File

@ -14,13 +14,13 @@ jobs:
steps:
- uses: https://gitea.com/actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.kluster.moll.re
username: ${{ gitea.repository_owner }}
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -29,5 +29,5 @@ jobs:
uses: docker/build-push-action@v5
with:
context: backend
tags: git.kluster.moll.re/remoll/fast_network_navigation/backend:latest
tags: git.kluster.moll.re/anydev/anyway-backend:latest
push: true

View File

@ -44,7 +44,7 @@ jobs:
- name: Add required secrets
run: |
echo ${{ secrets.ANDROID_SECRETS_BASE64 }} | base64 -d > ./android/secrets.properties
echo ${{ secrets.ANDROID_SECRETS_PROPERTIES }} > ./android/secrets.properties
working-directory: ./frontend
- name: Sanity check

View File

@ -1,34 +1,34 @@
on:
pull_request:
branches:
- main
paths:
- frontend/**
# on:
# pull_request:
# branches:
# - main
# paths:
# - frontend/**
name: Build web
# name: Build web
jobs:
build:
name: Build Web
runs-on: ubuntu-latest
steps:
# jobs:
# build:
# name: Build Web
# runs-on: ubuntu-latest
# steps:
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y xz-utils
# - name: Install prerequisites
# run: |
# sudo apt-get update
# sudo apt-get install -y xz-utils
- uses: actions/checkout@v4
# - uses: actions/checkout@v4
- uses: https://github.com/subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.19.6
cache: true
# - uses: https://github.com/subosito/flutter-action@v2
# with:
# channel: stable
# flutter-version: 3.19.6
# cache: true
- run: flutter pub get
working-directory: ./frontend
# - run: flutter pub get
# working-directory: ./frontend
- run: flutter build web
working-directory: ./frontend
# - run: flutter build web
# working-directory: ./frontend

View File

@ -14,4 +14,4 @@ EXPOSE 8000
ENV NUM_WORKERS=1
ENV OSM_CACHE_DIR=/cache
CMD ["fastapi", "run", "src/main.py", "--port 8000", "--workers $NUM_WORKERS"]
CMD fastapi run src/main.py --port 8000 --workers $NUM_WORKERS

View File

@ -2,7 +2,8 @@ import logging.config
from pathlib import Path
import os
PARAMETERS_DIR = Path('src/parameters')
LOCATION_PREFIX = Path('src')
PARAMETERS_DIR = LOCATION_PREFIX / 'parameters'
AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
LANDMARK_PARAMETERS_PATH = PARAMETERS_DIR / 'landmark_parameters.yaml'
OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
@ -16,7 +17,7 @@ OSM_CACHE_DIR = Path(cache_dir_string)
import logging
import yaml
LOGGING_CONFIG = Path('log_config.yaml')
LOGGING_CONFIG = LOCATION_PREFIX / 'log_config.yaml'
config = yaml.safe_load(LOGGING_CONFIG.read_text())
logging.config.dictConfig(config)