Skip to content

Commit

Permalink
fix docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
cbluth committed Aug 22, 2020
1 parent 30c84dd commit d1c7f21
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
docker-compose.yml
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:12.18-alpine

ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami"

COPY . /app
WORKDIR /app

Expand Down
22 changes: 10 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
version: '3.8'
---
version: '3'
services:
umami:
build: .
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:umami@postgres:5432/umami
DATABASE_URL: postgresql://umami:umami@db:5432/umami
HASH_SALT: replace-me-with-a-random-string
postgres:
depends_on:
- db
db:
image: postgres:alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
volumes:
- type: bind
source: ./sql/schema.postgresql.sql
target: /docker-entrypoint-initdb.d/schema.postgresql.sql
- type: volume
source: postgres-data
target: /var/lib/postgresql/data
- ./sql/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
- umami-db-data:/var/lib/postgresql/data
volumes:
postgres-data:
umami-db-data:

0 comments on commit d1c7f21

Please sign in to comment.