-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raphael Gachuhi
committed
May 21, 2018
1 parent
6a56b6c
commit e81fb59
Showing
8 changed files
with
285 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
version: '3.1' | ||
services: | ||
mysql-keycloak: | ||
build: ./mysql | ||
container_name: oli-mysql-keycloak | ||
env_file: | ||
- ./keycloak-mysql/keycloak.envs | ||
volumes: | ||
- /oli/databases/keycloak:/var/lib/mysql | ||
# - keycloak-db:/var/lib/mysql | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-mysql-keycloak" | ||
mysql-content: | ||
build: ./mysql | ||
image: oli/mysql | ||
container_name: oli-mysql-content-service | ||
env_file: | ||
- ../content-service/service.envs | ||
ports: | ||
- "3377:3307" | ||
volumes: | ||
- /oli/databases/content:/var/lib/mysql | ||
# - content-db:/var/lib/mysql | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-mysql-content" | ||
keycloak-sso: | ||
build: ./keycloak-mysql | ||
image: oli/keycloak-mgysql | ||
container_name: oli-keycloak | ||
env_file: | ||
- ./keycloak-mysql/keycloak.envs | ||
# volumes: | ||
# - /oli/databases/keycloak_dump:/export | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- mysql-keycloak | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-keycloak" | ||
content: | ||
build: ../content-service | ||
image: oli/content-service | ||
container_name: content-service | ||
env_file: | ||
- ../content-service/service.envs | ||
environment: | ||
- MYSQL_ADDRESS=mysql-content | ||
ports: | ||
- "9110:9990" # for remote deployment | ||
- "8787:8787" # for remote debugging | ||
volumes: | ||
- /oli/content/course_content_xml:/oli/course_content_xml | ||
- /oli/content/course_content_volume:/oli/course_content_volume | ||
- /oli/content/webcontent:/oli/webcontent | ||
- /oli/repository:/oli/repository | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- mysql-content | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-content-service" | ||
editor: | ||
build: ../course-editor | ||
image: oli/editor | ||
container_name: oli-editor | ||
ports: | ||
- "9000:9000" | ||
networks: | ||
- service-tier | ||
volumes: | ||
- ../course-editor:/app | ||
- ../course-editor/dist:/app/dist | ||
- /app/node_modules | ||
command: npm run dev | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-editor" | ||
nginx: | ||
build: frontend-nginx | ||
image: oli/nginx | ||
container_name: oli-nginx | ||
volumes: | ||
- ../course-editor/dist:/oli/course-editor/dist | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-nginx" | ||
web-assets: | ||
build: ./web-assets-nginx | ||
image: oli/web-assets-nginx | ||
container_name: oli-web-assets-nginx | ||
volumes: | ||
- /oli/content/webcontent:/oli/webcontent/webcontents | ||
- /oli/repository:/oli/repository | ||
- /oli/superactivity:/oli/superactivity | ||
- /oli/branding:/oli/branding | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-web-assets" | ||
ssh-server: | ||
build: ./ssh-server | ||
image: oli/ssh-server | ||
container_name: oli-ssh-server | ||
env_file: | ||
- ./ssh-server/ssh.envs | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-ssh-server" | ||
# gateway: | ||
# build: ../gateway | ||
# image: oli/gateway | ||
# container_name: oli-gateway | ||
# networks: | ||
# - service-tier | ||
# depends_on: | ||
# - fluentd | ||
# logging: | ||
# driver: fluentd | ||
# options: | ||
# fluentd-address: localhost:24224 | ||
# tag: "oli.oli-gateway" | ||
dev.local: | ||
build: ./ha-proxy | ||
image: oli/haproxy | ||
container_name: oli-haproxy | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
- "2222:2222" | ||
networks: | ||
- service-tier | ||
depends_on: | ||
- nginx | ||
- web-assets | ||
# - gateway | ||
- content | ||
- editor | ||
- ssh-server | ||
- fluentd | ||
logging: | ||
driver: fluentd | ||
options: | ||
fluentd-address: localhost:24224 | ||
tag: "oli.oli-haproxy" | ||
fluentd: | ||
build: ./fluentd | ||
image: oli/fluentd | ||
container_name: oli-fluentd | ||
networks: | ||
- service-tier | ||
elasticsearch: | ||
image: elasticsearch | ||
container_name: oli-elasticsearch | ||
expose: | ||
- 9200 | ||
networks: | ||
- service-tier | ||
kibana: | ||
image: kibana | ||
container_name: oli-kibana | ||
networks: | ||
- service-tier | ||
#volumes: | ||
# keycloak-db: | ||
# content-db: | ||
networks: | ||
service-tier: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#FROM fluent/fluentd:v0.12-debian | ||
#RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-rdoc", "--no-ri", "--version", "1.9.2"] | ||
#COPY fluent.conf /fluentd/etc/fluent.conf | ||
|
||
FROM fluent/fluentd:v1.1.3-onbuild | ||
|
||
USER root | ||
|
||
# below RUN includes plugin as examples elasticsearch is not required | ||
# you may customize including plugins as you wish | ||
|
||
RUN apk add --update --virtual .build-deps \ | ||
sudo build-base ruby-dev \ | ||
&& sudo -u fluent gem install \ | ||
fluent-plugin-elasticsearch \ | ||
fluent-plugin-record-reformer \ | ||
&& sudo -u fluent gem sources --clear-all \ | ||
&& apk del .build-deps \ | ||
&& rm -rf /var/cache/apk/* \ | ||
/home/fluent/.gem/ruby/2.3.0/cache/*.gem | ||
|
||
COPY fluent.conf /fluentd/etc/ | ||
|
||
USER fluent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# fluentd/conf/fluent.conf | ||
<source> | ||
@type forward | ||
port 24224 | ||
bind 0.0.0.0 | ||
</source> | ||
<match *.**> | ||
@type copy | ||
<store> | ||
@type elasticsearch | ||
host elasticsearch | ||
port 9200 | ||
logstash_format true | ||
logstash_prefix fluentd | ||
logstash_dateformat %Y%m%d | ||
include_tag_key true | ||
type_name access_log | ||
tag_key @log_name | ||
flush_interval 1s | ||
</store> | ||
<store> | ||
@type stdout | ||
</store> | ||
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
FROM nginx:alpine | ||
RUN mkdir -p /oli/webcontent/webcontents | ||
RUN mkdir -p /oli/repository | ||
RUN mkdir -p /oli/superactivity | ||
RUN mkdir -p /oli/branding | ||
RUN mkdir /usr/share/nginx/html/content-swagger | ||
COPY ./swagger/ /usr/share/nginx/html/content-swagger/ | ||
COPY ./default.conf /etc/nginx/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters