mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 07:19:36 +02:00
Update nginx migration documentation and enhance AdventureModal component functionality
This commit is contained in:
parent
efd19da10b
commit
6132b1c0d6
2 changed files with 9 additions and 15 deletions
|
@ -16,7 +16,7 @@ You can also just use the new `docker-compose.yml` file in the repository and ch
|
||||||
|
|
||||||
1. Remove the `nginx` service from your `docker-compose.yml` file.
|
1. Remove the `nginx` service from your `docker-compose.yml` file.
|
||||||
2. Update the `PUBLIC_URL` environment variable in the `server` service (backend) to match the address of your **server**, instead of the previous nginx instance. For example, if your server is exposed to `https://localhost:8000`, set `PUBLIC_URL` to `http://localhost:8000`. If you are using a domain name, set `PUBLIC_URL` to `https://api.yourdomain.com` as an example.
|
2. Update the `PUBLIC_URL` environment variable in the `server` service (backend) to match the address of your **server**, instead of the previous nginx instance. For example, if your server is exposed to `https://localhost:8000`, set `PUBLIC_URL` to `http://localhost:8000`. If you are using a domain name, set `PUBLIC_URL` to `https://api.yourdomain.com` as an example.
|
||||||
3. Change port mapping for the `server` service. Right now it probally looks like this:
|
3. Change port mapping for the `server` service. Right now it probably looks like this:
|
||||||
```yaml
|
```yaml
|
||||||
ports:
|
ports:
|
||||||
- "your-exposed-port:8000"
|
- "your-exposed-port:8000"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
export let latitude: number | null = null;
|
export let latitude: number | null = null;
|
||||||
export let collection: Collection | null = null;
|
export let collection: Collection | null = null;
|
||||||
|
|
||||||
import { DefaultMarker, MapEvents, MapLibre } from 'svelte-maplibre';
|
import { DefaultMarker, FillLayer, MapEvents, MapLibre } from 'svelte-maplibre';
|
||||||
|
|
||||||
let query: string = '';
|
let query: string = '';
|
||||||
let places: OpenStreetMapPlace[] = [];
|
let places: OpenStreetMapPlace[] = [];
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
if (longitude && latitude) {
|
if (longitude && latitude) {
|
||||||
adventure.latitude = latitude;
|
adventure.latitude = latitude;
|
||||||
adventure.longitude = longitude;
|
adventure.longitude = longitude;
|
||||||
reverseGeocode();
|
reverseGeocode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
|
@ -120,16 +120,6 @@
|
||||||
markers = [];
|
markers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// $: {
|
|
||||||
// if (
|
|
||||||
// reverseGeocodePlace?.display_name &&
|
|
||||||
// (old_display_name != reverseGeocodePlace.display_name || !adventure.location)
|
|
||||||
// ) {
|
|
||||||
// adventure.location = reverseGeocodePlace.display_name;
|
|
||||||
// old_display_name = reverseGeocodePlace.display_name;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
let imageSearch: string = adventure.name || '';
|
let imageSearch: string = adventure.name || '';
|
||||||
|
|
||||||
async function removeImage(id: string) {
|
async function removeImage(id: string) {
|
||||||
|
@ -298,7 +288,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reverseGeocode() {
|
async function reverseGeocode(force_update: boolean = false) {
|
||||||
let res = await fetch(
|
let res = await fetch(
|
||||||
`/api/reverse-geocode/reverse_geocode/?lat=${adventure.latitude}&lon=${adventure.longitude}`
|
`/api/reverse-geocode/reverse_geocode/?lat=${adventure.latitude}&lon=${adventure.longitude}`
|
||||||
);
|
);
|
||||||
|
@ -310,7 +300,11 @@
|
||||||
}
|
}
|
||||||
reverseGeocodePlace = data;
|
reverseGeocodePlace = data;
|
||||||
|
|
||||||
if (reverseGeocodePlace && reverseGeocodePlace.display_name && !is_custom_location) {
|
if (
|
||||||
|
reverseGeocodePlace &&
|
||||||
|
reverseGeocodePlace.display_name &&
|
||||||
|
(!is_custom_location || force_update)
|
||||||
|
) {
|
||||||
old_display_name = reverseGeocodePlace.display_name;
|
old_display_name = reverseGeocodePlace.display_name;
|
||||||
adventure.location = reverseGeocodePlace.display_name;
|
adventure.location = reverseGeocodePlace.display_name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue