Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building via docker-compose stuck on "Browserslist: caniuse-lite is outdated." #2739

Open
d-hain opened this issue May 11, 2024 · 2 comments

Comments

@d-hain
Copy link

d-hain commented May 11, 2024

Describe the Bug

I am building umami via a docker-compose.yml file, because I need the BASE_PATH to be set.
But when running docker compose up -d it gets stuck on "umami builder 6/6" when running yarn build-docker.
The exact error is:

=> [umami builder 6/6] RUN yarn build-docker                                                                                                     244.6s
 => => # $ next build
 => => #    ▲ Next.js 14.1.4
 => => #    Creating an optimized production build ...
 => => # Browserslist: caniuse-lite is outdated. Please run:
 => => #   npx update-browserslist-db@latest
 => => #   Why you should do it regularly: https://github.com/browserslist/update-db#readme

My source tree looks like this:
.
|-- db-data/ <-- database data
|-- docker-compose.yml
|-- source/ <-- umami repo

And this is my docker-compose.yml file:

---
version: '3'
services:
  umami:
#    image: ghcr.io/umami-software/umami:postgresql-latest
    build:
      context: ./source
      args:
        BASE_PATH: /umami
        DATABASE_TYPE: postgres
        SKIP_DB_CHECK: 1
        FORCE_SSL: 1
    ports:
      - "23100:3000"
    environment:
      DATABASE_URL: "postgresql://umami:<db-pwd>@db:5432/umami"
      DATABASE_TYPE: postgres
      APP_SECRET: <app-secret>
      COLLECTION_API_ENDPOINT: /umami/analytics
      TRACKER_SCRIPT_NAME: /umami/s.js
    depends_on:
      db:
        condition: service_healthy
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
      interval: 5s
      timeout: 5s
      retries: 5
  db:
    image: postgres:15-alpine
    ports:
      - "23101:5432"
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: <db-pwd>
    volumes:
      - /root/umami/db-data:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5

Database

PostgreSQL

Relevant log output

root@raspi-srv:~/umami# docker compose up -d
WARN[0000] /root/umami/docker-compose.yml: `version` is obsolete
[+] Building 122.4s (18/25)                                                                                               docker:default
 => [umami internal] load build definition from Dockerfile                                                                          0.1s
 => => transferring dockerfile: 1.81kB                                                                                              0.0s
 => [umami internal] load metadata for docker.io/library/node:18-alpine                                                             2.6s
 => [umami internal] load .dockerignore                                                                                             0.1s
 => => transferring context: 114B                                                                                                   0.0s
 => [umami internal] load build context                                                                                             0.6s
 => => transferring context: 68.52kB                                                                                                0.3s
 => [umami runner  1/12] FROM docker.io/library/node:18-alpine@sha256:4837c2ac8998cf172f5892fb45f229c328e4824c43c8506f8ba9c7996d70  0.0s
 => CACHED [umami runner  2/12] WORKDIR /app                                                                                        0.0s
 => CACHED [umami runner  3/12] RUN addgroup --system --gid 1001 nodejs                                                             0.0s
 => CACHED [umami runner  4/12] RUN adduser --system --uid 1001 nextjs                                                              0.0s
 => CACHED [umami runner  5/12] RUN set -x     && apk add --no-cache curl     && yarn add npm-run-all dotenv prisma semver          0.0s
 => CACHED [umami deps 2/6] RUN apk add --no-cache libc6-compat                                                                     0.0s
 => CACHED [umami deps 3/6] WORKDIR /app                                                                                            0.0s
 => CACHED [umami deps 4/6] COPY package.json yarn.lock ./                                                                          0.0s
 => CACHED [umami deps 5/6] RUN yarn config set network-timeout 300000                                                              0.0s
 => CACHED [umami deps 6/6] RUN yarn install --frozen-lockfile                                                                      0.0s
 => CACHED [umami builder 3/6] COPY --from=deps /app/node_modules ./node_modules                                                    0.0s
 => CACHED [umami builder 4/6] COPY . .                                                                                             0.0s
 => CACHED [umami builder 5/6] COPY docker/middleware.js ./src                                                                      0.0s
root@raspi-srv:~/umami# docker compose up -d
WARN[0000] /root/umami/docker-compose.yml: `version` is obsolete
[+] Building 122.4s (18/25)                                                                                               docker:default
 => [umami internal] load build definition from Dockerfile                                                                          0.1s
 => => transferring dockerfile: 1.81kB                                                                                              0.0s
 => [umami internal] load metadata for docker.io/library/node:18-alpine                                                             2.6s
 => [umami internal] load .dockerignore                                                                                             0.1s
 => => transferring context: 114B                                                                                                   0.0s
 => [umami internal] load build context                                                                                             0.6s
 => => transferring context: 68.52kB                                                                                                0.3s
 => [umami runner  1/12] FROM docker.io/library/node:18-alpine@sha256:4837c2ac8998cf172f5892fb45f229c328e4824c43c8506f8ba9c7996d70  0.0s
 => CACHED [umami runner  2/12] WORKDIR /app                                                                                        0.0s
 => CACHED [umami runner  3/12] RUN addgroup --system --gid 1001 nodejs                                                             0.0s
 => CACHED [umami runner  4/12] RUN adduser --system --uid 1001 nextjs                                                              0.0s
 => CACHED [umami runner  5/12] RUN set -x     && apk add --no-cache curl     && yarn add npm-run-all dotenv prisma semver          0.0s
 => CACHED [umami deps 2/6] RUN apk add --no-cache libc6-compat                                                                     0.0s
 => CACHED [umami deps 3/6] WORKDIR /app                                                                                            0.0s
 => CACHED [umami deps 4/6] COPY package.json yarn.lock ./                                                                          0.0s
 => CACHED [umami deps 5/6] RUN yarn config set network-timeout 300000                                                              0.0s
 => CACHED [umami deps 6/6] RUN yarn install --frozen-lockfile                                                                      0.0s
 => CACHED [umami builder 3/6] COPY --from=deps /app/node_modules ./node_modules                                                    0.0s
 => CACHED [umami builder 4/6] COPY . .                                                                                             0.0s
 => CACHED [umami builder 5/6] COPY docker/middleware.js ./src                                                                      0.0s

Which Umami version are you using? (if relevant)

latest, aka main branch

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

self hosted

@franciscao633
Copy link
Collaborator

Were you ever able to get the docker image to build successfully? I replicated your folder structure/compose file and the build was successful.

image

@d-hain
Copy link
Author

d-hain commented May 16, 2024

Ok I just tried it on my laptop and it worked completely fine.
Then I tried again on my Raspberry (which I probably should have mentioned before) and it got stuck again.

I am guessing that it is a memory issue or possibly CPU, but more likely RAM. So I'll have to figure that out myself I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants