This commit is contained in:
@ -1,3 +1,4 @@
|
||||
{% import 'macro/postgres.j2' as pg with context %}
|
||||
---
|
||||
version: '3.9'
|
||||
|
||||
@ -36,22 +37,7 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: postgres:14
|
||||
restart: always
|
||||
environment:
|
||||
- "POSTGRES_USER={{ gitea.db.user }}"
|
||||
- "POSTGRES_PASSWORD={{ gitea.db.password }}"
|
||||
- "POSTGRES_DB={{ gitea.db.name }}"
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready", "-U", "{{ gitea.db.user }}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
{{ pg.postgres("db", gitea.db.user, gitea.db.password, gitea.db.name, ["backend"], version="14" ) }}
|
||||
|
||||
drone:
|
||||
image: drone/drone:2
|
||||
@ -82,11 +68,13 @@ services:
|
||||
- gitea
|
||||
|
||||
networks:
|
||||
postgres:
|
||||
internal: true
|
||||
backend:
|
||||
internal: true
|
||||
|
||||
volumes:
|
||||
gitea_data:
|
||||
drone_data:
|
||||
pg_data:
|
||||
db_data:
|
||||
...
|
||||
|
Reference in New Issue
Block a user