-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: frontend 3001로 변경, dockerfile 오류수정, elk모듈
- Loading branch information
Showing
8 changed files
with
128 additions
and
40 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,3 @@ | ||
[submodule "elk"] | ||
path = elk | ||
url = https://github.com/0BVer/logging-example.git |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# docker-compose.prod 와 함께 실행 해야 합니다. # need to run with docker-compose.prod | ||
# docker compose -f docker-compose.prod.yml -f docker-compose.logging.yml up --build | ||
|
||
# changeme 로 설정된 임시 패스워드를 변경하여 사용하시길 바랍니다. # need to change temp password 'changeme' | ||
|
||
version: '3.7' | ||
|
||
services: | ||
elasticsearch: | ||
build: | ||
context: ./elk/elasticsearch | ||
args: | ||
ELASTIC_VERSION: 8.5.2 | ||
volumes: | ||
- ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z | ||
- elasticsearch:/usr/share/elasticsearch/data:Z | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
environment: | ||
node.name: elasticsearch | ||
ES_JAVA_OPTS: -Xms512m -Xmx512m | ||
# Bootstrap password. | ||
# Used to initialize the keystore during the initial startup of | ||
# Elasticsearch. Ignored on subsequent runs. | ||
ELASTIC_PASSWORD: changeme | ||
# Use single node discovery in order to disable production mode and avoid bootstrap checks. | ||
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html | ||
discovery.type: single-node | ||
restart: unless-stopped | ||
|
||
logstash: | ||
build: | ||
context: ./elk/logstash | ||
args: | ||
ELASTIC_VERSION: 8.5.2 | ||
volumes: | ||
- ./elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z | ||
- ./elk/logstash/pipeline:/usr/share/logstash/pipeline:ro,Z | ||
ports: | ||
- 5044:5044 | ||
- 50000:50000/tcp | ||
- 50000:50000/udp | ||
- 9600:9600 | ||
environment: | ||
LS_JAVA_OPTS: -Xms256m -Xmx256m | ||
LOGSTASH_INTERNAL_PASSWORD: changeme | ||
depends_on: | ||
- elasticsearch | ||
restart: unless-stopped | ||
|
||
kibana: | ||
build: | ||
context: ./elk/kibana | ||
args: | ||
ELASTIC_VERSION: 8.5.2 | ||
volumes: | ||
- ./elk/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z | ||
ports: | ||
- 5601:5601 | ||
environment: | ||
KIBANA_SYSTEM_PASSWORD: changeme | ||
depends_on: | ||
- elasticsearch | ||
restart: unless-stopped | ||
|
||
filebeat: | ||
build: | ||
context: ./elk/filebeat | ||
args: | ||
ELASTIC_VERSION: 8.5.2 | ||
entrypoint: "filebeat -e -strict.perms=false" | ||
volumes: | ||
- ./elk/filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml | ||
- ./nginx/log:/var/log/nginx # nginx log path (require same option on nginx container) | ||
depends_on: | ||
- logstash | ||
- elasticsearch | ||
- kibana | ||
|
||
volumes: | ||
elasticsearch: |
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,29 +1,13 @@ | ||
FROM node:18.12.1 | ||
|
||
USER root | ||
FROM node:16 as builder | ||
|
||
WORKDIR /frontend | ||
COPY . /frontend | ||
|
||
# 개발 | ||
RUN npm install --force | ||
|
||
# 배포 | ||
# RUN yarn | ||
# RUN yarn --ignore-platform | ||
|
||
# Make variable API_URL to put uri into url | ||
# uri 변수 형태로 받아서 url에 넣어 작동하도록 함 | ||
ENV REACT_APP_HOST_IP_ADDRESS $API_URL | ||
ENV REACT_APP_BACKEND_URL $REACT_APP_BACKEND_URL | ||
COPY /package.json . | ||
|
||
COPY . ./ | ||
RUN npm i --force | ||
|
||
# 개발 | ||
# docker-compose.yml 파일에 npm start 작성할거면 지워도 됨 | ||
#RUN npm start | ||
RUN npm cache clear --force | ||
|
||
# 배포 | ||
# RUN yarn run build | ||
COPY ./ ./ | ||
|
||
EXPOSE 3000 | ||
RUN npm run build |
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