Initial import
This commit is contained in:
commit
b6fcbc2829
6
.env.sample
Normal file
6
.env.sample
Normal file
@ -0,0 +1,6 @@
|
||||
TYPE=capsul_flask
|
||||
|
||||
DOMAIN=capsul_flask.example.com
|
||||
## Domain aliases
|
||||
#EXTRA_DOMAINS=', `www.capsul_flask.example.com`'
|
||||
LETS_ENCRYPT_ENV=production
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/.envrc
|
28
README.md
Normal file
28
README.md
Normal file
@ -0,0 +1,28 @@
|
||||
# capsul-flask
|
||||
|
||||
${REPO_DESCRIPTION}
|
||||
|
||||
<!-- metadata -->
|
||||
* **Category**:
|
||||
* **Status**:
|
||||
* **Image**: [`capsul-flask`](https://hub.docker.com/r/capsul-flask/capsul-flask)
|
||||
* **Healthcheck**:
|
||||
* **Backups**:
|
||||
* **Email**:
|
||||
* **Tests**:
|
||||
* **SSO**:
|
||||
<!-- endmetadata -->
|
||||
|
||||
## Basic usage
|
||||
|
||||
1. Set up Docker Swarm and [`abra`]
|
||||
2. Deploy [`coop-cloud/traefik`]
|
||||
3. `abra app new capsul-flask --secrets` (optionally with `--pass` if you'd like
|
||||
to save secrets in `pass`)
|
||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
||||
your Docker swarm box
|
||||
5. `abra app YOURAPPDOMAIN deploy`
|
||||
6. Open the configured domain in your browser to finish set-up
|
||||
|
||||
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
47
compose.yml
Normal file
47
compose.yml
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: 3wordchant/capsul-flask:latest
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
environment:
|
||||
- "POSTGRES_CONNECTION_PARAMETERS=host=db port=5432 user=capsul password=capsul dbname=capsul"
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=5000"
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
## Redirect from EXTRA_DOMAINS to DOMAIN
|
||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--tries=1", "http://localhost:5000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
|
||||
db:
|
||||
image: "postgres:9.6.5"
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- "postgres:/var/lib/postgresql/data"
|
||||
environment:
|
||||
POSTGRES_USER: capsul
|
||||
POSTGRES_PASSWORD: capsul
|
||||
POSTGRES_DB: capsul
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
internal: true
|
Loading…
Reference in New Issue
Block a user