mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-06-01 08:28:06 +00:00
Add a basic docker-compose example
This commit is contained in:
parent
7622a83973
commit
f46ac39076
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -59,3 +59,5 @@ pleroma.iml
|
|||
# Editor temp files
|
||||
/*~
|
||||
/*#
|
||||
|
||||
workdir
|
||||
|
|
|
@ -7,6 +7,10 @@ while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT
|
|||
sleep 1s
|
||||
done
|
||||
|
||||
echo "-- Creating db..."
|
||||
$HOME/bin/pleroma_ctl create
|
||||
|
||||
|
||||
echo "-- Running migrations..."
|
||||
$HOME/bin/pleroma_ctl migrate
|
||||
|
||||
|
|
36
installation/docker-compose/docker-compose.yml
Normal file
36
installation/docker-compose/docker-compose.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: ../..
|
||||
ports:
|
||||
- "4000:4000"
|
||||
environment:
|
||||
DB_USER: postgres
|
||||
DB_PASS: postgres
|
||||
GRAFANA_HOST: http://grafana:3000
|
||||
volumes:
|
||||
- "./workdir/pleroma:/var/lib/pleroma"
|
||||
restart: "always"
|
||||
db:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
PGDATA: "/pg_data"
|
||||
restart: "always"
|
||||
volumes:
|
||||
- "./workdir/pg_data:/pg_data"
|
||||
grafana:
|
||||
image: grafana/grafana-enterprise
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- "./workdir/grafana:/var/lib/grafana"
|
||||
- "./grafana-provisioning/:/etc/grafana/provisioning/"
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
|
|
@ -0,0 +1,7 @@
|
|||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
|
||||
- name: pleroma
|
||||
type: prometheus
|
||||
url: http://prometheus:9090
|
5
installation/docker-compose/prometheus.yml
Normal file
5
installation/docker-compose/prometheus.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
scrape_configs:
|
||||
- job_name: "pleroma"
|
||||
scrape_interval: 5s
|
||||
static_configs:
|
||||
- targets: ['web:4021']
|
Loading…
Reference in a new issue