-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
137 lines (128 loc) · 3.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
services:
api:
image: ghcr.io/paastech-cloud/api:0.2.1
container_name: paastech-api
env_file:
- .env
depends_on:
db:
condition: service_healthy
deployment-manager:
condition: service_started
networks:
- internal
labels:
- "traefik.http.routers.api.rule=Host(`api.paastech.cloud`)"
db:
image: postgres:15.3-alpine3.18
container_name: paastech-db
volumes:
- ./.db_data:/var/lib/postgresql/data:rw
healthcheck:
test: /usr/local/bin/pg_isready -U paastech -d paastech
interval: 5s
timeout: 10s
retries: 4
environment:
POSTGRES_DB: paastech
POSTGRES_USER: paastech
POSTGRES_PASSWORD: paastech
networks:
- internal
git-repo-manager:
image: ghcr.io/paastech-cloud/git-repo-manager:1.0.1
pull_policy: always
container_name: paastech-git-repo-manager
environment:
- GIT_REPOSITORY_BASE_PATH=/srv/repositories
- GIT_HOOKS_BASE_PATH=/srv/hooks
- SERVER_PORT=50051
- RUST_LOG=trace
volumes:
- /srv:/srv:rw
networks:
- internal
labels:
- "traefik.enable=false"
git-ssh-server:
image: ghcr.io/paastech-cloud/git-ssh-server:1.0.0
pull_policy: always
container_name: paastech-git-ssh-server
depends_on:
- db
environment:
- GIT_REPOSITORIES_FULL_BASE_PATH=/srv
- GIT_POSTGRESQL_USERNAME=paastech
- GIT_POSTGRESQL_PASSWORD=paastech
- GIT_POSTGRESQL_DATABASE_NAME=paastech
- GIT_POSTGRESQL_PORT=5432
- GIT_POSTGRESQL_HOST=db
- GIT_HOST_SIGNER_PATH=/etc/ssh/keys/id_ed25519
- GIT_LOG_LEVEL=debug
volumes:
- /srv/repositories:/srv
- $HOME/scripts/output/server:/etc/ssh/keys
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "2222:2222"
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
reservations:
cpus: "0.25"
memory: 128M
networks:
- internal
deployment-manager:
image: ghcr.io/paastech-cloud/pomegranate:0.2.0
container_name: paastech-deployment-manager
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
depends_on:
- reverse-proxy
env_file:
- .env
networks:
- internal
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.10
container_name: paastech-traefik
ports:
# The HTTP port
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# Let's encrypt certificates
- ./letsencrypt:/letsencrypt
command:
- --providers.docker=true
- --providers.docker.network=pomegranate-proxy-network
# Default entrypoint, redirect to 443 (HTTPS)
- --entryPoints.web.address=:80
- --entryPoints.web.http.redirections.entryPoint.to=websecure
- --entryPoints.web.http.redirections.entryPoint.scheme=https
- --entryPoints.web.http.redirections.entryPoint.permanent=true
# Secured endpoint
- --entryPoints.websecure.address=:443
- --entryPoints.websecure.http.tls.certResolver=letsencrypt
- --entryPoints.websecure.http.tls.domains[0].main=*.${POMEGRANATE_FQDN}
- --entryPoints.websecure.http.tls.domains[0].sans=*.${POMEGRANATE_FQDN},*.user-app.${POMEGRANATE_FQDN}
- --certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
- --certificatesResolvers.letsencrypt.acme.email=${POMEGRANATE_LETSENCRYPT_EMAIL}
- --certificatesResolvers.letsencrypt.acme.dnsChallenge.provider=${POMEGRANATE_LETSENCRYPT_PROVIDER}
env_file:
- .env
networks:
- internal
- pomegranate-proxy-network
networks:
pomegranate-proxy-network:
name: ${POMEGRANATE_DOCKER_NETWORK_NAME}
internal:
labels:
com.docker.compose.network: paastech-api-network