-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
140 lines (132 loc) · 4.44 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
138
139
140
services:
app:
image: aamdigital/ndb-server:${APP_VERSION:-latest}
container_name: ${INSTANCE_NAME}-app
networks:
- internal_aam
- external_web
volumes:
- ./config.json:/usr/share/nginx/html/assets/config.json
- ./keycloak.json:/usr/share/nginx/html/assets/keycloak.json
restart: unless-stopped
couchdb-only:
image: couchdb:3
container_name: ${INSTANCE_NAME}-database-entrypoint
user: "1000:1000"
networks:
- internal_aam
- external_web
volumes:
- ./couchdb/data:/opt/couchdb/data
- ./couchdb.ini:/opt/couchdb/etc/local.d/couchdb.ini
environment:
COUCHDB_USER: ${COUCHDB_USER:?COUCHDB_USER is not set}
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD:?COUCHDB_PASSWORD is not set}
restart: unless-stopped
profiles:
- database-only
couchdb-with-permissions:
image: couchdb:3
container_name: ${INSTANCE_NAME}-database
user: "1000:1000"
networks:
- internal_aam
- external_web
volumes:
- ./couchdb/data:/opt/couchdb/data
- ./couchdb.ini:/opt/couchdb/etc/local.d/couchdb.ini
environment:
COUCHDB_USER: ${COUCHDB_USER:?COUCHDB_USER is not set}
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD:?COUCHDB_PASSWORD is not set}
restart: unless-stopped
profiles:
- with-permissions
- full-stack
# (optional) replication-backend. Only deployed if "COMPOSE_PROFILES" is "with-permissions" or "full-stack" is set in the `.env` file
replication-backend:
image: ghcr.io/aam-digital/replication-backend:latest
container_name: ${INSTANCE_NAME}-database-entrypoint
networks:
- internal_aam
- external_web
depends_on:
- couchdb-with-permissions
environment:
DATABASE_URL: http://couchdb-with-permissions:5984
DATABASE_NAME: app
DATABASE_USER: ${COUCHDB_USER}
DATABASE_PASSWORD: ${COUCHDB_PASSWORD}
JWT_SECRET: ${REPLICATION_BACKEND_JWT_SECRET:?REPLICATION_BACKEND_JWT_SECRET is not set}
JWT_PUBLIC_KEY: "-----BEGIN PUBLIC KEY-----\n${REPLICATION_BACKEND_PUBLIC_KEY:?REPLICATION_BACKEND_PUBLIC_KEY is not set}\n-----END PUBLIC KEY-----"
SENTRY_DSN: ${SENTRY_DSN}
SENTRY_ENABLED: ${SENTRY_ENABLED}
SENTRY_INSTANCE_NAME: ${INSTANCE_NAME}.${INSTANCE_DOMAIN}
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
PORT: 5984
restart: unless-stopped
profiles:
- with-permissions
- full-stack
# (optional) aam-backend-service. Only deployed if "COMPOSE_PROFILES" is "full-stack" is set in the `.env` file
aam-backend-service:
image: ghcr.io/aam-digital/aam-backend-service:${AAM_BACKEND_SERVICE_VERSION:-latest}
container_name: ${INSTANCE_NAME}-aam-backend-service
networks:
- internal_aam
- external_web
depends_on:
- couchdb-with-permissions
- aam-backend-service-db
- rabbitmq
volumes:
- ./storage/aam-backend-service/data:/aam-backend-service/bin/data
env_file:
- ./config/aam-backend-service/application.env
restart: unless-stopped
profiles:
- full-stack
aam-backend-service-db:
image: postgres:16.5-bookworm
container_name: ${INSTANCE_NAME}-aam-backend-service-db
networks:
- internal_aam
volumes:
- ./storage/aam-backend-service/postgresql-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: aam-backend-service
POSTGRES_USER: ${COUCHDB_USER}
POSTGRES_PASSWORD: ${COUCHDB_PASSWORD}
restart: unless-stopped
profiles:
- full-stack
# (optional) needed for aam-backend-service. Only deployed if "COMPOSE_PROFILES" is "full-stack" is set in the `.env` file
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: ${INSTANCE_NAME}-rabbitmq
networks:
- internal_aam
restart: unless-stopped
volumes:
- ./storage/rabbitmq/data:/var/lib/rabbitmq/
- ./storage/rabbitmq/log:/var/log/rabbitmq
profiles:
- full-stack
# (optional) needed for aam-backend-service. Only deployed if "COMPOSE_PROFILES" is "full-stack" is set in the `.env` file
sqs:
image: ghcr.io/aam-digital/aam-sqs-linux:latest
container_name: ${INSTANCE_NAME}-sqs
networks:
- internal_aam
depends_on:
- couchdb-with-permissions
restart: unless-stopped
volumes:
- ./storage/sqs:/data
environment:
SQS_COUCHDB_URL: http://couchdb-with-permissions:5984
profiles:
- full-stack
networks:
internal_aam:
external_web:
external: true