mirror of
https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
synced 2025-04-19 03:24:42 -04:00
feat: Portainer (#123)
* feat: add portainer to docker compose for monitoring * feat: add portainer docker compose dev * feat: add portainer init password
This commit is contained in:
parent
08967b8091
commit
d8c0107489
5 changed files with 52 additions and 2 deletions
3
dev.env
3
dev.env
|
@ -48,3 +48,6 @@ RUST_LOG=info
|
|||
# PgAdmin
|
||||
PGADMIN_DEFAULT_EMAIL=admin@example.com
|
||||
PGADMIN_DEFAULT_PASSWORD=password
|
||||
|
||||
# Portainer (username: admin)
|
||||
PORTAINER_PASSWORD=password1234
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
version: '3'
|
||||
services:
|
||||
portainer:
|
||||
restart: on-failure
|
||||
image: portainer/portainer-ce:latest
|
||||
ports:
|
||||
- 9442:9000
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
minio:
|
||||
restart: on-failure
|
||||
image: minio/minio
|
||||
ports:
|
||||
- 9000:9000
|
||||
|
@ -10,6 +19,7 @@ services:
|
|||
command: server /data --console-address ":9001"
|
||||
|
||||
postgres:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/postgres.Dockerfile
|
||||
|
@ -24,6 +34,7 @@ services:
|
|||
- ./migrations/before:/docker-entrypoint-initdb.d
|
||||
|
||||
pgadmin:
|
||||
restart: on-failure
|
||||
image: dpage/pgadmin4
|
||||
depends_on:
|
||||
- postgres
|
||||
|
@ -36,15 +47,16 @@ services:
|
|||
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
|
||||
|
||||
redis:
|
||||
restart: on-failure
|
||||
image: redis
|
||||
ports:
|
||||
- 6380:6379
|
||||
|
||||
gotrue:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/gotrue.Dockerfile
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
|
|
|
@ -1,6 +1,26 @@
|
|||
version: '3'
|
||||
services:
|
||||
portainer:
|
||||
restart: on-failure
|
||||
image: portainer/portainer-ce:latest
|
||||
ports:
|
||||
- 9442:9000
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
portainer_init:
|
||||
depends_on:
|
||||
- portainer
|
||||
image: alpine/curl
|
||||
restart: on-failure
|
||||
environment:
|
||||
- PORTAINER_PASSWORD=${PORTAINER_PASSWORD}
|
||||
volumes:
|
||||
- ./docker/portainer/setup.sh:/setup.sh
|
||||
command: ./setup.sh
|
||||
|
||||
nginx:
|
||||
restart: on-failure
|
||||
image: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
|
@ -10,12 +30,14 @@ services:
|
|||
- appflowy_cloud
|
||||
- gotrue
|
||||
- admin_frontend
|
||||
- portainer
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/ssl/certificate.crt:/etc/nginx/ssl/certificate.crt
|
||||
- ./nginx/ssl/private_key.key:/etc/nginx/ssl/private_key.key
|
||||
|
||||
minio:
|
||||
restart: on-failure
|
||||
image: minio/minio
|
||||
ports:
|
||||
- 9000:9000
|
||||
|
@ -25,6 +47,7 @@ services:
|
|||
command: server /data --console-address ":9001"
|
||||
|
||||
postgres:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/postgres.Dockerfile
|
||||
|
@ -39,6 +62,7 @@ services:
|
|||
- ./migrations/before:/docker-entrypoint-initdb.d
|
||||
|
||||
pgadmin:
|
||||
restart: on-failure
|
||||
image: dpage/pgadmin4
|
||||
depends_on:
|
||||
- postgres
|
||||
|
@ -51,15 +75,16 @@ services:
|
|||
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
|
||||
|
||||
redis:
|
||||
restart: on-failure
|
||||
image: redis
|
||||
ports:
|
||||
- 6380:6379
|
||||
|
||||
gotrue:
|
||||
restart: on-failure
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/gotrue.Dockerfile
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
|
|
5
docker/portainer/setup.sh
Executable file
5
docker/portainer/setup.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
curl -i -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"Username": "admin", "Password": "'"$PORTAINER_PASSWORD"'"}' \
|
||||
http://portainer:9000/api/users/admin/init
|
|
@ -76,6 +76,11 @@ http {
|
|||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Portainer
|
||||
location /portainer/ {
|
||||
proxy_pass http://portainer:9000/;
|
||||
}
|
||||
|
||||
# Admin Frontend
|
||||
location / {
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
|
|
Loading…
Add table
Reference in a new issue