mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge pull request #14 from dbirks/feature/add-docker
Add Dockerfile and docker-compose.yml
This commit is contained in:
commit
5ad0ff3fa4
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -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
README.md
10
README.md
@ -6,7 +6,7 @@ Umami is a simple, fast, website analytics alternative to Google Analytics.
|
||||
|
||||
A detailed getting started guide can be found at [https://umami.is/docs/](https://umami.is/docs/)
|
||||
|
||||
## Installation
|
||||
## Installation from source
|
||||
|
||||
### Requirements
|
||||
|
||||
@ -100,6 +100,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
docker-compose.yml
Normal file
25
docker-compose.yml
Normal file
@ -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:
|
Loading…
Reference in New Issue
Block a user