initial version
This commit is contained in:
37
.env.sample
Normal file
37
.env.sample
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
BASEDIR=
|
||||||
|
INTRANET=
|
||||||
|
|
||||||
|
BASE_URL=http://yourdomain:3000
|
||||||
|
|
||||||
|
# generate with: openssl rand -hex 64
|
||||||
|
SECRET_KEY=notsecretkey
|
||||||
|
|
||||||
|
# Do not remove if you want to prevent this user from being edited/deleted
|
||||||
|
DEFAULT_ADMIN_EMAIL=demo@demo.demo
|
||||||
|
DEFAULT_ADMIN_PASSWORD=demo
|
||||||
|
DEFAULT_ADMIN_NAME=Demo Demo
|
||||||
|
DEFAULT_ADMIN_USERNAME=demo
|
||||||
|
|
||||||
|
# TRUST_PROXY=0
|
||||||
|
# TOKEN_EXPIRES_IN=365 # In days
|
||||||
|
|
||||||
|
# related: https://github.com/knex/knex/issues/2354
|
||||||
|
# As knex does not pass query parameters from the connection string we
|
||||||
|
# have to use environment variables in order to pass the desired values, e.g.
|
||||||
|
# PGSSLMODE=<value>
|
||||||
|
|
||||||
|
# Configure knex to accept SSL certificates
|
||||||
|
# KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
||||||
|
|
||||||
|
# OIDC_ISSUER=
|
||||||
|
# OIDC_CLIENT_ID=
|
||||||
|
# OIDC_CLIENT_SECRET=
|
||||||
|
# OIDC_SCOPES=openid email profile
|
||||||
|
# OIDC_ADMIN_ROLES=admin
|
||||||
|
# OIDC_EMAIL_ATTRIBUTE=email
|
||||||
|
# OIDC_NAME_ATTRIBUTE=name
|
||||||
|
# OIDC_USERNAME_ATTRIBUTE=preferred_username
|
||||||
|
# OIDC_ROLES_ATTRIBUTE=groups
|
||||||
|
# OIDC_IGNORE_USERNAME=true
|
||||||
|
# OIDC_IGNORE_ROLES=true
|
||||||
|
# OIDC_ENFORCED=true
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.env
|
||||||
45
README.md
45
README.md
@@ -1,2 +1,45 @@
|
|||||||
# compose-planka
|
# Basic Planka docker-compose config
|
||||||
|
* can be run on single node setup or in swarm
|
||||||
|
|
||||||
|
## howto
|
||||||
|
### single node
|
||||||
|
#### start container
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
#### stop container (and remove)
|
||||||
|
```bash
|
||||||
|
docker compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
#### view logs
|
||||||
|
```bash
|
||||||
|
docker compose logs -f
|
||||||
|
```
|
||||||
|
|
||||||
|
#### reload config
|
||||||
|
```bash
|
||||||
|
docker compose restart
|
||||||
|
```
|
||||||
|
|
||||||
|
### swarm
|
||||||
|
#### start aka deploy
|
||||||
|
```bash
|
||||||
|
docker stack deploy -c docker-compose.yml planka
|
||||||
|
```
|
||||||
|
|
||||||
|
#### stop container aka service
|
||||||
|
```bash
|
||||||
|
docker stack rm planka
|
||||||
|
```
|
||||||
|
|
||||||
|
#### view logs
|
||||||
|
```bash
|
||||||
|
docker service logs planka_planka -f
|
||||||
|
```
|
||||||
|
|
||||||
|
#### reload config
|
||||||
|
```bash
|
||||||
|
docker service update planka_planka --force
|
||||||
|
```
|
||||||
|
|||||||
60
docker-compose.yml
Normal file
60
docker-compose.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# https://docs.planka.cloud
|
||||||
|
# https://github.com/plankanban/planka
|
||||||
|
# https://docs.planka.cloud/docs/installation/docker/production_version
|
||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
planka:
|
||||||
|
image: ghcr.io/plankanban/planka:latest
|
||||||
|
container_name: planka
|
||||||
|
restart: on-failure
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- ${BASEDIR:-.}/files/user-avatars:/app/public/user-avatars
|
||||||
|
- ${BASEDIR:-.}/files/project-background-images:/app/public/project-background-images
|
||||||
|
- ${BASEDIR:-.}/files/attachments:/app/private/attachments
|
||||||
|
ports:
|
||||||
|
- 3000:1337
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
placement:
|
||||||
|
max_replicas_per_node: 1
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
delay: 10s
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=postgresql://postgres@postgres/planka
|
||||||
|
|
||||||
|
plankadb:
|
||||||
|
image: postgres:14-alpine
|
||||||
|
container_name: plankadb
|
||||||
|
restart: on-failure
|
||||||
|
volumes:
|
||||||
|
- ${BASEDIR:-.}/files/db-data:/var/lib/postgresql/data
|
||||||
|
network:
|
||||||
|
- backend
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=planka
|
||||||
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
placement:
|
||||||
|
max_replicas_per_node: 1
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
delay: 10s
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
networks:
|
||||||
|
backend:
|
||||||
|
name: ${INTRANET:-backend}
|
||||||
|
external: true
|
||||||
Reference in New Issue
Block a user