Files
Mickael PAPAMICA Asseline 7258debbe1 fix images
2022-09-02 13:35:34 +02:00

194 lines
6.1 KiB
YAML

# Maintainer: Mickael "PAPAMICA" Asseline
# Update: 2022-05-24
#& type: 3
#& title: Outline
#& description: A fast, collaborative, knowledge base for your team built using React and Node.js. (Like Notion)
#& note: Website: <a href='https://www.getoutline.com/' target='_blank' rel='noopener'>GetOutline.com</a></br></br>After first run, comment line <code>188</code> and configure your authentification.
#& categories: SelfHosted, PAPAMICA
#& platform: linux
#& logo: https://img.papamica.com/logo/outline.webp
#% SERVICE: Name of the service (No spaces or points) [outline]
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
#% URL: Service URL (Example: service.papamica.fr or service.com)
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
#% DB_USER: Database user (No spaces or points) [outline]
#% DB_PASSWORD: Database user password
#% SECRET_KEY: Outline secret Key (Use: openssl rand -hex 32)
#% UTILS_SECRET: Outline utils secret (Use: openssl rand -hex 32)
#% DEFAULT_LANGUAGE: Default language (Example: fr_FR) [fr_FR]
#% URL_MINIO: URL for your S2 storage API (Example: s3.papamica.com)
#% MINIO_ACCESS_KEY: Minio access key (Use: openssl rand -hex 8)
#% MINIO_SECRET_KEY: Minio secret key (Use: openssl rand -hex 32)
# Work with Portainer
version: "3"
services:
redis:
image: redis
restart: always
container_name: $SERVICE-redis
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
networks:
- default
healthcheck:
test: ["CMD", "redis-cli","ping"]
postgres:
container_name: $SERVICE-db
image: postgres
environment:
POSTGRES_USER: $DB_USER
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $SERVICE
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $DB_USER"]
interval: 10s
timeout: 5s
retries: 5
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
volumes:
- $DATA_LOCATION/$SERVICE/db:/var/lib/postgresql/data
networks:
- default
storage:
image: minio/minio
container_name: $SERVICE-minio
entrypoint: sh
command: -c 'minio server /data --console-address ":43579"'
deploy:
restart_policy:
condition: on-failure
volumes:
- $DATA_LOCATION/$SERVICE/data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- default
environment:
- MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY
- MINIO_SECRET_KEY=$MINIO_SECRET_KEY
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
- "traefik.enable=true"
# Console
#- "traefik.http.routers.$SERVICE-minio.rule=Host(`test.papamica.com`)"
#- "traefik.http.routers.$SERVICE-minio.tls.certresolver=http"
#- "traefik.http.services.$SERVICE-minio.loadbalancer.server.port=43579"
# API
- "traefik.http.routers.$SERVICE-bucket.rule=Host(`$URL_MINIO`)"
- "traefik.http.routers.$SERVICE-bucket.tls.certresolver=http"
- "traefik.http.services.$SERVICE-bucket.loadbalancer.server.port=9000"
- "traefik.http.services.$SERVICE-bucket.loadbalancer.passhostheader=true"
- "traefik.docker.network=$NETWORK"
createbuckets:
image: minio/mc
container_name: $SERVICE-createbuckets
depends_on:
- storage
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio https://$URL_MINIO $MINIO_ACCESS_KEY $MINIO_SECRET_KEY;
/usr/bin/mc mb myminio/outline-data;
/usr/bin/mc policy readwrite myminio/outline-data;
exit 0;"
networks:
- default
outline:
image: outlinewiki/outline
restart: always
container_name: $SERVICE
environment:
# -- General configuration -- #
- URL=https://$URL
- SECRET_KEY=$SECRET_KEY
- UTILS_SECRET=$UTILS_SECRET
- DATABASE_URL=postgres://$DB_USER:$DB_PASSWORD@$SERVICE-db/$SERVICE
- PGSSLMODE=disable
- REDIS_URL=redis://$SERVICE-redis
- DEFAULT_LANGUAGE=$DEFAULT_LANGUAGE
#- COLLABORATION_URL=
- FORCE_HTTPS=false
#- ENABLE_UPDATES=true
#- TEAM_LOGO=https://example.com/images/logo.png
# -- AWS configuration -- #
- AWS_ACCESS_KEY_ID=$MINIO_ACCESS_KEY
- AWS_SECRET_ACCESS_KEY=$MINIO_SECRET_KEY
- AWS_REGION=xx-xxxxx-x
#- AWS_S3_ACCELERATE_URL=
- AWS_S3_UPLOAD_BUCKET_URL=https://$URL_MINIO
- AWS_S3_UPLOAD_BUCKET_NAME=outline-data
- AWS_S3_UPLOAD_MAX_SIZE=26214400
- AWS_S3_FORCE_PATH_STYLE=true
- AWS_S3_ACL=private
# -- Slack configuration -- #
#- SLACK_CLIENT_ID=
#- SLACK_CLIENT_SECRET=
#- SLACK_APP_ID=
#- SLACK_MESSAGE_ACTIONS=true
#- SLACK_VERIFICATION_TOKEN=
# -- Google configuration -- #
#- GOOGLE_CLIENT_ID=
#- GOOGLE_CLIENT_SECRET=
# -- Azure configuration -- #
#- AZURE_CLIENT_ID=
#- AZURE_CLIENT_SECRET=
#- AZURE_RESOURCE_APP_ID=
# -- OIDC configuration -- #
#- OIDC_CLIENT_ID=
#- OIDC_CLIENT_SECRET=
#- OIDC_AUTH_URI=
#- OIDC_TOKEN_URI=
#- OIDC_USERINFO_URI=
#- OIDC_USERNAME_CLAIM=preferred_username``
#- OIDC_DISPLAY_NAME=OpenID
#- OIDC_SCOPES=openid profile email
# -- SMTP configuration -- #
#- SMTP_HOST=
#- SMTP_PORT=
#- SMTP_USERNAME=
#- SMTP_PASSWORD=
#- SMTP_FROM_EMAIL=
#- SMTP_REPLY_EMAIL=
#- SMTP_TLS_CIPHERS=
#- SMTP_SECURE=true
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
- "traefik.enable=true"
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
- "traefik.http.services.$SERVICE.loadbalancer.server.port=3000"
- "traefik.docker.network=$NETWORK"
depends_on:
storage:
condition: service_started
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- default
command: sh -c "yarn sequelize db:migrate --env=production-ssl-disabled"
networks:
default:
external:
name: $NETWORK