-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
134 lines (110 loc) · 2.71 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
134 lines (110 loc) · 2.71 KB
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
secrets:
jwt_private:
file: ./secrets/jwt_private.pem
jwt_public:
file: ./secrets/jwt_public.pem
networks:
internal:
ipam:
config:
- subnet: 172.22.0.0/24
bridge:
driver: bridge
services:
api:
image: api
container_name: api
build:
context: ${BACKEND_PATH}
dockerfile: LytharBackend/Dockerfile
environment:
Jwt__PrivateKey: /run/secrets/jwt_private
Jwt__PublicKey: /run/secrets/jwt_public
DatabaseContext__AutoRunMigrations: true
ConnectionStrings__DatabaseContext: Host=172.22.0.9;Database=lythar;Username=postgres;Password=${DB_PASSWORD}
LocalFileService__RootPath: /var/lib/lythar/uploads
ASPNETCORE_HTTP_PORTS: 5505
Ldap__Host: 172.22.0.8
Ldap__Port: 389
Ldap__SearchDn: ${LDAP_DN}
Ldap__AdminDn: ${LDAP_ADMIN_DN}
Ldap__AdminPassword: ${LDAP_ADMIN_PASSWORD}
volumes:
- ./uploads:/var/lib/lythar/uploads
secrets:
- jwt_private
- jwt_public
restart: always
depends_on:
db:
condition: service_healthy
ldap:
condition: service_started
networks:
internal:
ipv4_address: 172.22.0.6
frontend:
container_name: frontend
build:
context: ${FRONTEND_PATH}
dockerfile: prod.Dockerfile
environment:
NEXT_PUBLIC_ORGANIZATION_NAME: ${NEXT_PUBLIC_ORGANIZATION_NAME}
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
JWT_PUBLIC_KEY: ${JWT_PUBLIC_KEY}
depends_on:
- api
networks:
internal:
ipv4_address: 172.22.0.7
restart: always
ldap:
image: osixia/openldap:1.5.0
container_name: ldap
restart: always
environment:
LDAP_ORGANISATION: "Lythar"
LDAP_DOMAIN: ${LDAP_DOMAIN}
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD}
LDAP_ADMIN_DN: ${LDAP_ADMIN_DN}
BASE_DN: ${LDAP_ADMIN_DN}
ports:
- "389:389"
networks:
internal:
ipv4_address: 172.22.0.8
db:
image: postgres:16
container_name: database
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "lythar", "-U", "postgres" ]
interval: 5s
timeout: 10s
retries: 120
environment:
POSTGRES_DB: "lythar"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./postgres:/var/lib/postgresql/data
ports:
- "5432"
networks:
internal:
ipv4_address: 172.22.0.9
proxy:
image: nginx:alpine
container_name: proxy
restart: always
ports:
- "80:8080"
volumes:
- ./nginx:/etc/nginx/
- ./nginx/logs:/var/log/nginx/
depends_on:
- api
- frontend
networks:
- internal
- bridge