Compare commits
No commits in common. "fde087d1edf1fc2d15efdcfe5f9e22ba35cad281" and "0c692a62e8739ae9b04dfe9e68f451e28233983b" have entirely different histories.
fde087d1ed
...
0c692a62e8
@ -1,4 +0,0 @@
|
|||||||
PB_ADMIN_EMAIL=admin@example.com
|
|
||||||
PB_ADMIN_PASSWORD=secret-password
|
|
||||||
PB_URL=http://pocketbase:8080
|
|
||||||
PB_DATA_DIR=/pb/pb_data
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,7 +7,6 @@ node_modules
|
|||||||
.wrangler
|
.wrangler
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/build
|
/build
|
||||||
/data
|
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG PB_VERSION=0.29.2
|
ARG PB_VERSION=0.29.2
|
||||||
|
ENV PB_DATA_DIR=/pb_data
|
||||||
|
|
||||||
WORKDIR /pb
|
WORKDIR /pb
|
||||||
|
|
||||||
@ -18,8 +19,6 @@ RUN unzip /tmp/pb.zip -d /pb/
|
|||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ]
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
@ -7,14 +7,14 @@ set -e
|
|||||||
: "${PB_DATA_DIR:?need PB_DATA_DIR}"
|
: "${PB_DATA_DIR:?need PB_DATA_DIR}"
|
||||||
|
|
||||||
# ensure data dir exists (for embedded SQLite + migrations + files)
|
# ensure data dir exists (for embedded SQLite + migrations + files)
|
||||||
# mkdir -p "${PB_DATA_DIR}"
|
mkdir -p "${PB_DATA_DIR}"
|
||||||
# export POCKETBASE_DATA_DIR="${PB_DATA_DIR}"
|
export POCKETBASE_DATA_DIR="${PB_DATA_DIR}"
|
||||||
|
|
||||||
# if there are no users yet, create the superuser
|
# if there are no users yet, create the superuser
|
||||||
# we check the sqlite file for any existing record in the users table
|
# we check the sqlite file for any existing record in the users table
|
||||||
if [ ! -f "${PB_DATA_DIR}/pb_data.db" ] \
|
if [ ! -f "${PB_DATA_DIR}/pb_data.db" ] || ! \
|
||||||
! sqlite3 "${PB_DATA_DIR}/data.db" \
|
sqlite3 "${PB_DATA_DIR}/pb_data.db" \
|
||||||
"SELECT id FROM _superusers WHERE email='${PB_ADMIN_EMAIL}' LIMIT 1;" \
|
"SELECT id FROM users WHERE email='${PB_ADMIN_EMAIL}' LIMIT 1;" \
|
||||||
| grep -q .; then
|
| grep -q .; then
|
||||||
|
|
||||||
echo ">>> Creating PocketBase superuser: ${PB_ADMIN_EMAIL}"
|
echo ">>> Creating PocketBase superuser: ${PB_ADMIN_EMAIL}"
|
||||||
|
@ -9,8 +9,6 @@ services:
|
|||||||
build: api
|
build: api
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/data:/pb/pb_data
|
- ./data:/pb_data
|
||||||
- ./data/migrations:/pb/pb_migrations
|
|
||||||
- ./data/hooks:/pb/pb_hooks
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
@ -1,12 +1,2 @@
|
|||||||
<script lang="ts">
|
|
||||||
import type { PageProps } from "./$types"
|
|
||||||
|
|
||||||
let { data }: PageProps = $props()
|
|
||||||
|
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Welcome to SvelteKit</h1>
|
<h1>Welcome to SvelteKit</h1>
|
||||||
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user