Skip to content

Commit f864785

Browse files
Fixed PhpLdapAdmin panel and now accessible on the host browser
1 parent 57f4524 commit f864785

File tree

3 files changed

+62
-9
lines changed

3 files changed

+62
-9
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ WORKDIR /app
1717

1818
# Copy binary and config
1919
COPY --from=builder /app/bin/laclm ./bin/laclm
20-
COPY config.yaml .
20+
# COPY config.yaml .
2121
COPY .env .
2222

2323
# Install `bash` to source the env file

config.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# config.yaml
2-
31
# backend environment configs
42
app:
5-
# name: laclm-dev
63
version: v1.1
74
debug_mode: true
85

@@ -14,8 +11,8 @@ server:
1411
# databases for operations
1512
database:
1613
transaction_log_redis:
17-
address: localhost
18-
password: ${LACLM_TRANS_REDIS_PASSWORD}
14+
address: redis # Docker service name, not localhost
15+
password: ${LACLM_TRANS_REDIS_PASSWORD}
1916
db: 1
2017

2118
# logging configurations
@@ -31,16 +28,16 @@ filesystem_servers:
3128
- path: /mnt/beegfs-1
3229
method: remote
3330
remote:
34-
host: 127.0.0.1
31+
host: host.docker.internal # allows container to access host network
3532
port: 4444
3633

3734
# authentication information
3835
authentication:
3936
ldap:
4037
tls: true
41-
address: "ldaps://ldap.example.com"
38+
address: "ldaps://openldap" # Use the service name from docker-compose
4239
admin_dn: ${LACLM_LDAP_ADMIN_DN}
43-
admin_password: ${LACLM_LDAP_ADMIN_PASSWORD}
40+
admin_password: ${LACLM_LDAP_ADMIN_PASSWORD}
4441

4542
backend_security:
4643
jwt_secret_token: ${JWT_SECRET_TOKEN}

docker-compose.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: "3.8"
2+
3+
services:
4+
go-app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
container_name: laclm
9+
ports:
10+
- "8080:8080"
11+
volumes:
12+
# config.yaml is mounted as volume - editable outside docker
13+
- ./config.yaml:/app/config.yaml
14+
depends_on:
15+
- openldap
16+
- redis
17+
networks:
18+
- backend
19+
20+
openldap:
21+
image: osixia/openldap:latest
22+
container_name: institutional-openldap
23+
environment:
24+
LDAP_ORGANISATION: "My Org"
25+
LDAP_DOMAIN: "myorg.local"
26+
LDAP_ADMIN_PASSWORD: "admin"
27+
ports:
28+
- "389:389"
29+
- "636:636"
30+
networks:
31+
- backend
32+
33+
phpldapadmin:
34+
image: osixia/phpldapadmin:0.9.0
35+
container_name: phpldapadmin
36+
environment:
37+
PHPLDAPADMIN_LDAP_HOSTS: openldap
38+
PHPLDAPADMIN_HTTPS: "false" # disable HTTPS for local development
39+
ports:
40+
- "8090:80" # accessible via http://localhost:8090
41+
depends_on:
42+
- openldap
43+
networks:
44+
- backend
45+
46+
redis:
47+
image: redis:8.0.1
48+
container_name: transaction-log-redis
49+
ports:
50+
- "6379:6379"
51+
networks:
52+
- backend
53+
54+
networks:
55+
backend:
56+
driver: bridge

0 commit comments

Comments
 (0)