From 19d3013cf908936ce640c11a9c202b5dfda1a2c0 Mon Sep 17 00:00:00 2001 From: Christian Beutel <> Date: Fri, 15 Mar 2024 23:20:04 +0100 Subject: [PATCH] switches to public docker images --- .gitignore | 5 +++-- README.md | 8 ++++---- db/Dockerfile | 12 +++--------- docker-compose.yml | 17 ++++++++++++----- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index bf4f62a6..0f4bf525 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ .DS_Store .vscode/ -db/pocketbase +db/pocketbase* search/meilisearch search/data.ms search/dumps -run.sh \ No newline at end of file +run.sh +build.sh \ No newline at end of file diff --git a/README.md b/README.md index 81119638..6f853f76 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ The recommended and quickest way to install wanderer is using docker compose: ``` bash # clone the git repository -git clone https://github.com/Flomp/wanderer -cd wanderer +wget https://raw.githubusercontent.com/Flomp/wanderer/main/docker-compose.yml + # build and launch via docker compose -docker compose up -d --build +docker compose up -d ``` -You can now access the frontend at localhost:3000. +The first startup can take up to 90 seconds after which you can access the frontend at localhost:3000. > Note: if you are using wanderer in a production environment make sure to change the MEILI_MASTER_KEY. diff --git a/db/Dockerfile b/db/Dockerfile index e761b57e..f879e434 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -1,17 +1,11 @@ -FROM golang:1.22-alpine -RUN apk add build-base +FROM alpine:3.16 WORKDIR / -COPY go.mod ./ -COPY go.sum ./ COPY migrations ./migrations -RUN go mod download - -COPY *.go ./ - -RUN go build -o /pocketbase +COPY ./pocketbase_arm64 /pocketbase +RUN chmod +x /pocketbase ENV MEILI_URL=http://localhost:7700 ENV MEILI_MASTER_KEY= diff --git a/docker-compose.yml b/docker-compose.yml index 824492c9..7fb0d254 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ x-common-env: &cenv services: search: container_name: wanderer-search - build: ./search + image: flomp/wanderer-search environment: <<: *cenv MEILI_NO_ANALYTICS: true @@ -17,14 +17,19 @@ services: - wanderer volumes: - ./data/data.ms:/meili_data/data.ms - restart: unless-stopped + healthcheck: + test: curl --fail http://localhost:7700/health || exit 1 + interval: 15s + retries: 10 + start_period: 20s + timeout: 10s db: container_name: wanderer-db - build: ./db + image: flomp/wanderer-db depends_on: search: - condition: service_started + condition: service_healthy environment: <<: *cenv ports: @@ -36,8 +41,10 @@ services: - ./data/pb_data:/pb_data web: container_name: wanderer-web - build: ./web + image: flomp/wanderer-web depends_on: + search: + condition: service_healthy db: condition: service_started environment: