-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
128 lines (121 loc) · 4.08 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
128 lines (121 loc) · 4.08 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
services:
postgres:
image: postgres:18-alpine
container_name: ${POSTGRES_CONTAINER_NAME:-ironsnake-postgres-dev}
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-ironsnake}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data_dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- ironsnake-network-dev
core:
build:
context: ./core
dockerfile: Dockerfile.dev
container_name: ${CORE_CONTAINER_NAME:-ironsnake-core-dev}
environment:
DATABASE_URL: "host=${POSTGRES_HOST:-postgres} user=${POSTGRES_USER:-postgres} password=${POSTGRES_PASSWORD:-postgres} dbname=${POSTGRES_DB:-ironsnake} port=5432 sslmode=${POSTGRES_SSLMODE:-disable}"
LDAP_URL: ${LDAP_URL:-ldap://openldap:389}
LDAP_BASE_DN: ${LDAP_BASE_DN:-dc=ironsnake,dc=local}
LDAP_BIND_DN: ${LDAP_BIND_DN:-cn=admin,dc=ironsnake,dc=local}
LDAP_BIND_PASSWORD: ${LDAP_BIND_PASSWORD:-admin}
LDAP_USER_FILTER: ${LDAP_USER_FILTER:-(uid=%s)}
LDAP_USER_BASE_DN: ${LDAP_USER_BASE_DN:-ou=users,dc=ironsnake,dc=local}
JWT_SECRET: ${JWT_SECRET:-change-this-secret-in-production}
JWT_EXPIRATION_HOURS: ${JWT_EXPIRATION_HOURS:-24}
ports:
- "${CORE_PORT:-8080}:8080"
volumes:
- ./core:/app
- /app/tmp
- ./courses:/app/courses
- /var/run/docker.sock:/var/run/docker.sock # Enable code execution in Docker
- /tmp/ironsnake-code:/tmp/ironsnake-code # Shared temp dir for code execution
depends_on:
postgres:
condition: service_healthy
openldap:
condition: service_started
networks:
- ironsnake-network-dev
front:
build:
context: ./front
dockerfile: Dockerfile.dev
container_name: ${FRONT_CONTAINER_NAME:-ironsnake-front-dev}
environment:
NODE_ENV: development
ORIGIN: ${ORIGIN:-http://localhost:3000}
PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:8080}
ports:
- "${FRONT_PORT:-3000}:3000"
volumes:
- ./front:/app
- /app/node_modules
- /app/.svelte-kit
depends_on:
- core
networks:
- ironsnake-network-dev
proxy:
build:
context: ./proxy
dockerfile: Dockerfile
container_name: ${PROXY_CONTAINER_NAME:-ironsnake-proxy-dev}
ports:
- "${PROXY_PORT:-80}:80"
depends_on:
- front
- core
networks:
- ironsnake-network-dev
openldap:
image: osixia/openldap:1.5.0
container_name: ${LDAP_CONTAINER_NAME:-ironsnake-openldap-dev}
environment:
LDAP_ORGANISATION: ${LDAP_ORGANISATION:-IronSnake}
LDAP_DOMAIN: ${LDAP_DOMAIN:-ironsnake.local}
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
LDAP_CONFIG_PASSWORD: ${LDAP_CONFIG_PASSWORD:-config}
LDAP_RFC2307BIS_SCHEMA: ${LDAP_RFC2307BIS_SCHEMA:-false}
LDAP_REMOVE_CONFIG_AFTER_SETUP: ${LDAP_REMOVE_CONFIG_AFTER_SETUP:-true}
LDAP_TLS_VERIFY_CLIENT: ${LDAP_TLS_VERIFY_CLIENT:-never}
LDAP_SEED_INTERNAL_LDIF_PATH: /container/service/slapd/assets/config/bootstrap/ldif/custom
ports:
- "${LDAP_PORT:-389}:389"
- "${LDAPS_PORT:-636}:636"
volumes:
- ldap_data_dev:/var/lib/ldap
- ldap_config_dev:/etc/ldap/slapd.d
- ./ldap/init.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/init.ldif:ro
networks:
- ironsnake-network-dev
command: --copy-service
phpldapadmin:
image: osixia/phpldapadmin:0.9.0
container_name: ${PHPLDAPADMIN_CONTAINER_NAME:-ironsnake-phpldapadmin-dev}
environment:
PHPLDAPADMIN_LDAP_HOSTS: ${PHPLDAPADMIN_LDAP_HOSTS:-openldap}
PHPLDAPADMIN_HTTPS: ${PHPLDAPADMIN_HTTPS:-false}
ports:
- "${PHPLDAPADMIN_PORT:-6443}:80"
depends_on:
- openldap
networks:
- ironsnake-network-dev
volumes:
postgres_data_dev:
ldap_data_dev:
ldap_config_dev:
networks:
ironsnake-network-dev:
driver: bridge