-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
156 lines (143 loc) · 4.8 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: '3'
networks:
cody:
external: true
services:
cody-traefik:
image: traefik:latest
command:
#- "--log.level=ERROR"
#- "--providers.docker.tls.insecureSkipVerify=true"
- "--configFile=/etc/traefik/traefik.yml"
#- "--api.insecure=true"
#- "--providers.docker=true"
#- "--providers.docker.exposedbydefault=false"
#- "--entrypoints.web.address=:80"
#- "--entrypoints.websecure.address=:443"
#- "--entrypoints.websecure.http.tls.certResolver=myresolver"
#- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
#- "--certificatesresolvers.myresolver.acme.email=support@insecia.com"
#- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
#- "--tls.certificates.certFile=/etc/traefik/traefik.crt"
#- "--tls.certificates.keyFile=/etc/traefik/traefik.key"
ports:
- "80:80"
- "443:443"
- "8081:8080" # Traefik Dashboard
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
#- "./letsencrypt:/letsencrypt"
- "./env/docker/traefik/:/etc/traefik/"
labels:
- "traefik.enable=true"
#- "traefik.http.routers.api.rule=Host(`traefik.localhost`)"
#- "traefik.http.routers.api.service=api@internal"
#- "traefik.http.routers.api.middlewares=auth"
#- "traefik.http.middlewares.auth.basicauth.users=traefik:$apr1$/cBT9MbG$k4z9dmqpqHnqvnpGkM6ei."
networks:
- cody
keycloak:
build:
context: ./env/docker/keycloak
dockerfile: Dockerfile
labels:
- "traefik.enable=true"
- "traefik.http.routers.keycloak.rule=Host(`${KC_DOMAIN}`)"
- "traefik.http.routers.keycloak.entrypoints=websecure"
- "traefik.http.routers.keycloak.tls=true"
- "traefik.http.services.keycloak.loadbalancer.server.port=8443"
- "traefik.http.services.keycloak.loadbalancer.server.scheme=https"
volumes:
- ./env/docker/keycloak/import:/opt/keycloak/data/import
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_DB_URL_PORT: 5432
KC_DB_URL_HOST: postgres
command: "start-dev --import-realm"
depends_on:
- postgres
networks:
- cody
# postgres DB
postgres:
build:
context: ./env/docker/postgres
ports:
- 5432:5432
environment:
#general DB settings and init keycloak DB
POSTGRES_DB: keycloak
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
#App database
POSTGRES_APP_USER: dbadmin
POSTGRES_APP_USER_PASSWORD: password
POSTGRES_APP_DB: app
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- cody
# pgadmin UI for postgres
pgadmin:
build:
context: env/docker/pgadmin
dockerfile: Dockerfile
labels:
- "traefik.enable=true"
- "traefik.http.routers.pgadmin.rule=Host(`${PGADMIN_DOMAIN}`)"
- "traefik.http.routers.pgadmin.entrypoints=websecure"
- "traefik.http.routers.pgadmin.tls=true"
- "traefik.http.services.pgadmin.loadbalancer.server.port=443"
- "traefik.http.services.pgadmin.loadbalancer.server.scheme=https"
#ports:
# - "5433:443"
# - "580:80"
volumes:
- ./env/docker/pgadmin/backups:/backups:rw
- ./env/docker/pgadmin/tmp:/tmp:rw
environment:
PGADMIN_ENABLE_TLS: "true"
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "dev"
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
depends_on:
- postgres
networks:
- cody
# local S3 storage
minio:
image: minio/minio:latest
volumes:
- minio-data:/data
ports:
#- 9000:9000
- 9090:9090
environment:
MINIO_ROOT_USER: "minio"
MINIO_ROOT_PASSWORD: "miniominio"
command: server --console-address ":9090" /data
labels:
- "traefik.enable=true"
- "traefik.http.routers.myminio.entrypoints=websecure"
- "traefik.http.routers.myminio.tls=true"
- "traefik.http.routers.myminio.rule=Host(`${S3_DOMAIN}`)"
- "traefik.http.routers.myminio.service=myminio"
- "traefik.http.services.myminio.loadbalancer.server.port=9000"
- "traefik.http.services.myminio.loadbalancer.server.scheme=http"
- "traefik.http.routers.myminioadmin.entrypoints=websecure"
- "traefik.http.routers.myminioadmin.tls=true"
- "traefik.http.routers.myminioadmin.rule=Host(`${S3_ADMIN_DOMAIN}`)"
- "traefik.http.routers.myminioadmin.service=myminioadmin"
- "traefik.http.services.myminioadmin.loadbalancer.server.port=9090"
- "traefik.http.services.myminioadmin.loadbalancer.server.scheme=http"
networks:
- cody
volumes:
postgres_data:
driver: local
minio-data:
driver: local