Updated makefile/dockerfile/compose files

This commit is contained in:
2023-12-19 16:16:30 -05:00
parent 0b4145ac30
commit 6f002856c1
10 changed files with 78 additions and 69 deletions

View File

@@ -1,7 +1,10 @@
#!make
SHELL := /bin/bash
GIT_HASH ?= $(shell git log --format="%h" -n 1)
include .env
.PHONY: help build start stop lint
help: ## This info
@@ -10,7 +13,7 @@ help: ## This info
@echo
build: ## Install the dependencies and build
docker compose build
export TAG=${GIT_HASH} && docker compose build
up: ## Start the dev instance
docker compose up -d
@@ -23,4 +26,4 @@ lint: ## Run the linter
clean: ## Remove node modules
docker compose down && \
docker image rm weather-ui
docker image rm aviation-ui

View File

@@ -1,9 +1,9 @@
version: '3'
name: weather
name: aviation
services:
ui:
container_name: weather-ui
container_name: aviation-ui
env_file:
- .env
environment:
@@ -13,6 +13,8 @@ services:
build:
context: ./
target: dev
tags:
- aviation-ui:${TAG:-latest}
command: "npm run dev"
volumes:
- ./src:/app/src

View File

@@ -8,19 +8,15 @@ export default function CreateAirportPanel() {
initialValues: {
icao: '',
category: AirportCategory.SMALL,
full_name: '',
name: '',
elevation_ft: 0,
iso_country: '',
iso_region: '',
municipality: '',
gps_code: '',
iata_code: '',
local_code: '',
point: {
x: 0,
y: 0,
srid: 4326
}
latitude: 0,
longitude: 0,
}
});
@@ -46,6 +42,11 @@ export default function CreateAirportPanel() {
{ value: AirportCategory.SMALL, label: 'Small' },
{ value: AirportCategory.MEDIUM, label: 'Medium' },
{ value: AirportCategory.LARGE, label: 'Large' },
{ value: AirportCategory.HELIPORT, label: 'Heliport' },
{ value: AirportCategory.CLOSED, label: 'Closed' },
{ value: AirportCategory.SEAPLANE, label: 'Seaplane Base' },
{ value: AirportCategory.BALLOONPORT, label: 'Balloonport' },
{ value: AirportCategory.UNKNOWN, label: 'Unknown'}
]}
{...form.getInputProps('category')}
/>
@@ -53,7 +54,7 @@ export default function CreateAirportPanel() {
required
label='Full Name'
placeholder='Manassas Regional Airport/Harry P. Davis Field'
{...form.getInputProps('full_name')}
{...form.getInputProps('name')}
/>
<TextInput
required
@@ -82,12 +83,6 @@ export default function CreateAirportPanel() {
/>
</Group>
<Group>
<TextInput
required
label='GPS Code'
placeholder='KHEF'
{...form.getInputProps('gps_code')}
/>
<TextInput
label='IATA Code'
placeholder='MNZ'
@@ -104,13 +99,13 @@ export default function CreateAirportPanel() {
required
label='Latitude'
placeholder='38.72140121'
{...form.getInputProps('point.x')}
{...form.getInputProps('latitude')}
/>
<TextInput
required
label='Longitude'
placeholder='-77.51540375'
{...form.getInputProps('point.y')}
{...form.getInputProps('longitude')}
/>
</Group>
<Flex justify={'end'} mt={'sm'}>

View File

@@ -9,19 +9,15 @@ export default function UpdateAirportModal({ airport, setAirport }: { airport: A
initialValues: {
icao: airport?.icao || '',
category: airport?.category || AirportCategory.SMALL,
full_name: airport?.full_name || '',
name: airport?.name || '',
elevation_ft: airport?.elevation_ft || 0,
iso_country: airport?.iso_country || '',
iso_region: airport?.iso_region || '',
municipality: airport?.municipality || '',
gps_code: airport?.gps_code || '',
iata_code: airport?.iata_code || '',
local_code: airport?.local_code || '',
point: {
x: airport?.point.x || 0,
y: airport?.point.y || 0,
srid: airport?.point.srid || 4326
}
latitude: airport?.latitude || 0,
longitude: airport?.longitude || 0,
}
});
@@ -56,6 +52,11 @@ export default function UpdateAirportModal({ airport, setAirport }: { airport: A
{ value: AirportCategory.SMALL, label: 'Small' },
{ value: AirportCategory.MEDIUM, label: 'Medium' },
{ value: AirportCategory.LARGE, label: 'Large' },
{ value: AirportCategory.HELIPORT, label: 'Heliport' },
{ value: AirportCategory.CLOSED, label: 'Closed' },
{ value: AirportCategory.SEAPLANE, label: 'Seaplane Base' },
{ value: AirportCategory.BALLOONPORT, label: 'Balloonport' },
{ value: AirportCategory.UNKNOWN, label: 'Unknown'}
]}
{...form.getInputProps('category')}
/>
@@ -63,7 +64,7 @@ export default function UpdateAirportModal({ airport, setAirport }: { airport: A
required
label='Full Name'
placeholder='Manassas Regional Airport/Harry P. Davis Field'
{...form.getInputProps('full_name')}
{...form.getInputProps('name')}
/>
<TextInput
required
@@ -92,12 +93,6 @@ export default function UpdateAirportModal({ airport, setAirport }: { airport: A
/>
</Group>
<Group>
<TextInput
required
label='GPS Code'
placeholder='KHEF'
{...form.getInputProps('gps_code')}
/>
<TextInput
required
label='IATA Code'
@@ -116,13 +111,13 @@ export default function UpdateAirportModal({ airport, setAirport }: { airport: A
required
label='Latitude'
placeholder='38.72140121'
{...form.getInputProps('point.x')}
{...form.getInputProps('latitude')}
/>
<TextInput
required
label='Longitude'
placeholder='-77.51540375'
{...form.getInputProps('point.y')}
{...form.getInputProps('longitude')}
/>
</Group>
<Flex justify={'end'} mt={'sm'}>