diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..451b4f7 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +PB_ADMIN_EMAIL=admin@example.com +PB_ADMIN_PASSWORD=secret-password +PB_URL=http://pocketbase:8080 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3b462cb..9493f25 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ node_modules .wrangler /.svelte-kit /build +/data # OS .DS_Store diff --git a/api/Dockerfile b/api/Dockerfile index 7eeb0ab..fd622bb 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,7 +1,6 @@ FROM alpine:latest ARG PB_VERSION=0.29.2 -ENV PB_DATA_DIR=/pb_data WORKDIR /pb @@ -19,6 +18,8 @@ RUN unzip /tmp/pb.zip -d /pb/ COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh +VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ] + EXPOSE 8080 ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 9ac2cf2..56b42ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: build: api env_file: .env volumes: - - ./data:/pb_data + - ./data/data:/pb/pb_data + - ./data/migrations:/pb/pb_migrations + - ./data/hooks:/pb/pb_hooks ports: - "8080:8080" \ No newline at end of file