Skip to content

Commit

Permalink
Add Dockerfile and docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirks committed Aug 19, 2020
1 parent 2d69b30 commit d15d235
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:12.18-alpine

COPY . /app
WORKDIR /app

RUN npm install \
&& npm run build-postgresql-client \
&& npm run build

EXPOSE 3000

CMD ["npm", "start"]
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# umami

## Installation
## Installation from source

### Get the source code

Expand Down Expand Up @@ -87,6 +87,14 @@ By default this will launch the application on `http://localhost:3000`. You will
[proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) requests from your web server
or change the [port](https://nextjs.org/docs/api-reference/cli#production) to serve the application directly.

## Installation with Docker

To build the umami container and start up a Postgres database, run:

```
docker-compose up
```

## License

MIT
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3.8'
services:
umami:
build: .
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:umami@postgres:5432/umami
HASH_SALT: replace-me-with-a-random-string
postgres:
image: postgres:alpine
ports:
- "5432:5432"
environment:
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
volumes:
postgres-data:

0 comments on commit d15d235

Please sign in to comment.