docker
parent
534790bd41
commit
8d4d8bc30a
|
@ -3,8 +3,6 @@ FROM node:12.18-alpine AS build
|
||||||
ARG BASE_PATH
|
ARG BASE_PATH
|
||||||
ARG DATABASE_TYPE
|
ARG DATABASE_TYPE
|
||||||
ENV BASE_PATH=$BASE_PATH
|
ENV BASE_PATH=$BASE_PATH
|
||||||
ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami" \
|
|
||||||
DATABASE_TYPE=$DATABASE_TYPE
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN yarn config set --home enableTelemetry 0
|
RUN yarn config set --home enableTelemetry 0
|
||||||
|
|
|
@ -1,26 +1,25 @@
|
||||||
---
|
version: "3.9"
|
||||||
version: '3'
|
services:
|
||||||
services:
|
caddy-gen:
|
||||||
umami:
|
image: "wemakeservices/caddy-gen:latest"
|
||||||
image: ghcr.io/mikecao/umami:postgresql-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:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
env_file:
|
||||||
DATABASE_URL: postgresql://umami:umami@db:5432/umami
|
- .env
|
||||||
DATABASE_TYPE: postgresql
|
labels:
|
||||||
HASH_SALT: replace-me-with-a-random-string
|
virtual.host: "cappuccino.nisarg.io"
|
||||||
depends_on:
|
virtual.port: "3000"
|
||||||
- db
|
virtual.tls-email: "me@nisarg.io"
|
||||||
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:
|
|
Loading…
Reference in New Issue