diff --git a/Dockerfile b/Dockerfile index 7d086546..1982bc08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,6 @@ FROM node:12.18-alpine AS build ARG BASE_PATH ARG DATABASE_TYPE ENV BASE_PATH=$BASE_PATH -ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami" \ - DATABASE_TYPE=$DATABASE_TYPE WORKDIR /build RUN yarn config set --home enableTelemetry 0 diff --git a/docker-compose.yml b/docker-compose.yml index 61bc8228..ade563b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,26 +1,25 @@ ---- -version: '3' -services: - umami: - image: ghcr.io/mikecao/umami:postgresql-latest +version: "3.9" +services: + caddy-gen: + image: "wemakeservices/caddy-gen:latest" + restart: always + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro # needs socket to read events + - ./caddy-info:/data/caddy # needs volume to back up certificates + ports: + - "80:80" + - "443:443" + depends_on: + - main + main: + build: . ports: - "3000:3000" - environment: - DATABASE_URL: postgresql://umami:umami@db:5432/umami - DATABASE_TYPE: postgresql - HASH_SALT: replace-me-with-a-random-string - depends_on: - - db - restart: always - db: - image: postgres:12-alpine - environment: - POSTGRES_DB: umami - POSTGRES_USER: umami - POSTGRES_PASSWORD: umami - volumes: - - ./sql/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro - - umami-db-data:/var/lib/postgresql/data - restart: always -volumes: - umami-db-data: + env_file: + - .env + labels: + virtual.host: "cappuccino.nisarg.io" + virtual.port: "3000" + virtual.tls-email: "me@nisarg.io" + + \ No newline at end of file