generated from alecodes/base-template
chore: add build workflow
This commit is contained in:
parent
6288969c4d
commit
aab5621862
4 changed files with 153 additions and 2 deletions
63
docker/docker-stack.yaml
Normal file
63
docker/docker-stack.yaml
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
services:
|
||||
index:
|
||||
image: git.alecodes.page/alecodes/index:${GITHUB_SHA:-latest}
|
||||
networks:
|
||||
- reverse_proxy
|
||||
- default
|
||||
secrets:
|
||||
- index_db_pass
|
||||
environment:
|
||||
SQLPAGE_WEB_ROOT: /app/app
|
||||
DB_DRIVER: postgres
|
||||
DB_HOST: tasks.db
|
||||
DB_USER: index
|
||||
DB_NAME: index
|
||||
DB_PASSWORD_FILE: /run/secrets/index_db_pass
|
||||
deploy:
|
||||
rollback_config:
|
||||
failure_action: continue
|
||||
update_config:
|
||||
delay: 2s
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.services_kind==projects
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.index.rule=Host(`index.alecodes.page`)
|
||||
- traefik.http.services.index.loadbalancer.server.port=8080
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
networks:
|
||||
- default
|
||||
secrets:
|
||||
- index_db_pass
|
||||
environment:
|
||||
POSTGRES_USER: index
|
||||
POSTGRES_DB: index
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/index_db_pass
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
deploy:
|
||||
rollback_config:
|
||||
failure_action: continue
|
||||
update_config:
|
||||
delay: 2s
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.services_kind==projects
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
reverse_proxy:
|
||||
external: true
|
||||
|
||||
secrets:
|
||||
index_db_pass:
|
||||
external: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue