service-garage/README.md

115 lines
2.3 KiB
Markdown
Raw Normal View History

2023-04-16 19:22:40 +00:00
2023-04-16 21:45:54 +00:00
2023-04-16 19:22:40 +00:00
# Garage
2023-04-16 21:45:54 +00:00
[![Build Status](https://cicd.apps.glenux.net/api/badges/glenux-opencontainers/service-garage/status.svg)](https://cicd.apps.glenux.net/glenux-opencontainers/service-garage)
2023-04-16 19:22:40 +00:00
## Installation
### Main app
Create app
dokku apps:create objstorage
Setup internal network
dokku network:create objstorage_net
dokku network:set code attach-post-create objstorage_net
2023-04-16 21:40:54 +00:00
Deploy image
dokku git:from-image automation glenux/service-garage:xxxx
2023-04-16 19:22:40 +00:00
Setup proxy
dokku proxy:ports-clear objstorage
Setup storage
dokku storage:mount objstorage /var/lib/dokku/data/storage/cloud/apps:/var/www/html/apps
2023-04-16 21:40:54 +00:00
Restart
2023-04-16 19:22:40 +00:00
2023-04-16 21:40:54 +00:00
dokku ps:restart objstorage
2023-04-16 19:22:40 +00:00
### Web relay
Create app
dokku apps:create objstorage-web
2023-04-16 21:40:54 +00:00
Setup internal network
dokku network:set objstorage-web attach-post-create objstorage_net
2023-04-16 19:22:40 +00:00
Setup domain
dokku domains:add objstorage-web web.apps.example.com
dokku domains:add objstorage-web *.web.apps.example.com
2023-04-16 21:40:54 +00:00
Setup proxy
dokku proxy:ports-clear objstorage-web
dokku proxy: FIXME: setup proxy ports
2023-04-16 19:22:40 +00:00
Setup TLS
dokku config:set --no-restart objstorage-web DOKKU_LETSENCRYPT_EMAIL=username@example.com
dokku letsencrypt:enable objstorage-web
2023-04-16 21:40:54 +00:00
2023-04-16 19:22:40 +00:00
Configure docker options
2023-04-16 21:40:54 +00:00
dokku config:set objstorage-web DOKKU_DOCKERFILE_START_CMD="tcp-listen:FIXME:port,fork,reuseaddr tcp-connect:objstorage:FIXME:port"
2023-04-16 19:22:40 +00:00
Deploy image
2023-04-16 21:40:54 +00:00
dokku git:from-image objstorage-web alpine/socat:xxxx
Restart
dokku ps:restart objstorage-web
2023-04-16 19:22:40 +00:00
### S3 relay
Create app
dokku apps:create objstorage-s3
2023-04-16 21:40:54 +00:00
Setup internal network
dokku network:set objstorage-web attach-post-create objstorage_net
Deploy image
dokku git:from-image objstorage-s3 alpine/socat:xxxx
2023-04-16 19:22:40 +00:00
Setup domain
dokku domains:add objstorage s3.apps.example.com
dokku domains:add objstorage *.s3.apps.example.com
2023-04-16 21:40:54 +00:00
Setup proxy
dokku proxy:ports-clear objstorage-web
dokku proxy: FIXME: setup proxy ports
2023-04-16 19:22:40 +00:00
Setup TLS
dokku config:set --no-restart objstorage DOKKU_LETSENCRYPT_EMAIL=username@example.com
dokku letsencrypt:enable objstorage-s3
Configure docker options
2023-04-16 21:40:54 +00:00
dokku config:set objstorage-web DOKKU_DOCKERFILE_START_CMD="tcp-listen:FIXME:port,fork,reuseaddr tcp-connect:objstorage:FIXME:port"
2023-04-16 19:22:40 +00:00
2023-04-16 21:40:54 +00:00
Restart
2023-04-16 19:22:40 +00:00
2023-04-16 21:40:54 +00:00
dokku ps:restart objstorage-s3
2023-04-16 19:22:40 +00:00
## References
* https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/