-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🔖 release 2.1.0 - Landmarks and docker support
- Loading branch information
Showing
24 changed files
with
827 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
VITE_MAPBOX_KEY="MAPBOX_API_KEY" | ||
VITE_POCKETBASE_URL="http://localhost:8090" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
# Forager | ||
|
||
## 2.1.0 | ||
|
||
### Minor Changes | ||
|
||
- 2f5dabb: Users can now create landmarks - Users are now able to create landmarks. This feature | ||
re-purposes the arbitrary item menu to allow users to | ||
add landmarks to the map. Landmarks, like items, can also be deleted. | ||
- a021252: move calendar month component to images menu - Previously, all added items of interest could not have | ||
their calendar months customised. You can now customise | ||
items 'startMonth' and 'endMonth' months, the months | ||
you can expect to find this item in the wild. Any existing | ||
items you have will need to be manually edited. | ||
|
||
### Patch Changes | ||
|
||
- 68ed2d7: Include Docker deployment options - Forager can now be deployed with a Docker image | ||
- bb3202a: Create loading screen on application login | ||
- ad34d82: Add migration for default services, canCreateAccounts now defaults to true | ||
- c03d753: Create user and item seeder | ||
|
||
## 2.0.0 | ||
|
||
### Major Changes | ||
|
||
- Move environment settings to user account | ||
- Users will | ||
now have to provide thier own Mapbox API keys on account creation (this is a breaking change). | ||
- Users will now have to ensure the appropriate | ||
Pocketbase server URL is set on first launch to | ||
properly communicate with the server. | ||
|
||
- Move environment settings to user account - Users will | ||
now have to provide thier own Mapbox API keys on account creation (this is a breaking change). - Users will now have to ensure the appropriate | ||
Pocketbase server URL is set on first launch to | ||
properly communicate with the server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
FROM node:18.12.1 | ||
FROM alpine:latest | ||
|
||
LABEL author="Craig Broughton" | ||
LABEL author.email="[email protected]" | ||
ARG FORAGER_VERSION=2.0.1 | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache \ | ||
unzip \ | ||
ca-certificates | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
# download and unzip Forager | ||
ADD https://github.com/CRBroughton/forager/releases/download/${FORAGER_VERSION}/forager-${FORAGER_VERSION}-linux.zip /tmp/forager.zip | ||
|
||
ADD . . | ||
RUN unzip /tmp/forager.zip -d forager | ||
RUN cd forager && mv forager-${FORAGER_VERSION}-linux forager | ||
RUN rm -rf /tmp/forager/zip | ||
|
||
RUN npm i -g pnpm && pnpm i | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
EXPOSE 4000 | ||
|
||
CMD ["npm", "run", "dev"] | ||
# start Forager | ||
CMD ["forager/forager", "serve", "--http=0.0.0.0:8090"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package migrations | ||
|
||
import ( | ||
"github.com/pocketbase/dbx" | ||
"github.com/pocketbase/pocketbase/daos" | ||
m "github.com/pocketbase/pocketbase/migrations" | ||
"github.com/pocketbase/pocketbase/models" | ||
) | ||
|
||
func init() { | ||
m.Register(func(db dbx.Builder) error { | ||
dao := daos.New(db) | ||
|
||
collection, err := dao.FindCollectionByNameOrId("Services") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
record := models.NewRecord(collection) | ||
|
||
record.Set("id", 1) | ||
record.Set("canCreateAccounts", true) | ||
|
||
err = dao.SaveRecord(record) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
}, func(db dbx.Builder) error { | ||
dao := daos.New(db) | ||
|
||
collection, err := dao.FindCollectionByNameOrId("Services") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
record, err := dao.FindRecordById(collection.Id, "1") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = dao.DeleteRecord(record) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package migrations | ||
|
||
import ( | ||
"github.com/pocketbase/dbx" | ||
"github.com/pocketbase/pocketbase/daos" | ||
m "github.com/pocketbase/pocketbase/migrations" | ||
"github.com/pocketbase/pocketbase/models" | ||
"github.com/pocketbase/pocketbase/models/schema" | ||
"github.com/pocketbase/pocketbase/tools/types" | ||
) | ||
|
||
func init() { | ||
m.Register(func(db dbx.Builder) error { | ||
dao := daos.New(db) | ||
|
||
ownerOnly := types.Pointer("@request.auth.id != '' && owner.id ?= @request.auth.id") | ||
usersCollection, err := dao.FindCollectionByNameOrId("users") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
collection := &models.Collection{ | ||
Name: "landmarks", | ||
Type: models.CollectionTypeBase, | ||
ListRule: ownerOnly, | ||
ViewRule: ownerOnly, | ||
CreateRule: types.Pointer(""), | ||
UpdateRule: ownerOnly, | ||
DeleteRule: ownerOnly, | ||
System: false, | ||
Schema: schema.NewSchema( | ||
&schema.SchemaField{ | ||
Name: "name", | ||
Type: schema.FieldTypeText, | ||
Required: true, | ||
System: false, | ||
}, | ||
&schema.SchemaField{ | ||
Name: "owner", | ||
Type: schema.FieldTypeRelation, | ||
Required: true, | ||
System: false, | ||
Options: &schema.RelationOptions{ | ||
CollectionId: usersCollection.Id, | ||
CascadeDelete: false, | ||
MinSelect: types.Pointer(1), | ||
MaxSelect: types.Pointer(1), | ||
}, | ||
}, | ||
&schema.SchemaField{ | ||
Name: "lng", | ||
Type: schema.FieldTypeNumber, | ||
Required: true, | ||
System: false, | ||
}, | ||
&schema.SchemaField{ | ||
Name: "lat", | ||
Type: schema.FieldTypeNumber, | ||
Required: true, | ||
System: false, | ||
}, | ||
), | ||
} | ||
|
||
err = dao.SaveCollection(collection) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
}, func(db dbx.Builder) error { | ||
dao := daos.New(db) | ||
|
||
collection, err := dao.FindCollectionByNameOrId("landmarks") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = dao.DeleteCollection(collection) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
}) | ||
} |
Oops, something went wrong.