File tree Expand file tree Collapse file tree 8 files changed +65
-18
lines changed
Expand file tree Collapse file tree 8 files changed +65
-18
lines changed Original file line number Diff line number Diff line change 11# 컴파일러 임시 파일들
22server /code /*
33! server /code /.gitkeep
4+ .github /*
45.env
Original file line number Diff line number Diff line change 1- FROM python:3.9-slim-buster
1+ FROM python:3.9-slim-bookworm
22
33WORKDIR /usr/src/app
44
Original file line number Diff line number Diff line change 1+ # 서버 루트 파일에 들어가 있는 docker-compose.yml
2+ # flask-server 컨테이너에 들어가있는 거 X
3+
14services :
25 backend :
3- build : .
6+ build :
7+ context : ./Zivorp_Backend
8+ dockerfile : Dockerfile
9+ container_name : spring-backend
10+ working_dir : /app
411 ports :
512 - " 8080:8080"
13+ networks :
14+ - debug-net
615 depends_on :
716 - flask
8- environment :
9- SPRING_DATASOURCE_URL : jdbc:mysql://db:3306/debugdb
10- SPRING_DATASOURCE_USERNAME : root
11- SPRING_DATASOURCE_PASSWORD : hmjeoung33
1217
1318 flask :
1419 build :
15- context : ./flask # Flask Dockerfile 위치
16- container_name : python-compiler
20+ context : ./Zivorp_Spike
21+ dockerfile : Dockerfile
22+ container_name : flask-server
1723 ports :
1824 - " 5050:5050"
25+ volumes :
26+ - /home/ec2-user/Zivorp_Spike/server/code:/usr/src/app/code
27+ - /var/run/docker.sock:/var/run/docker.sock
28+ networks :
29+ - debug-net
30+ dns :
31+ - 8.8.8.8
32+ - 8.8.4.4
33+ environment :
34+ - PYTHONIOENCODING=utf-8
35+ - LANG=C.UTF-8
36+ - LC_ALL=C.UTF-8
37+ env_file :
38+ - ./Zivorp_Spike/.env
1939
20- db :
21- image : mysql:8.0
22- ports :
23- - " 3306:3306"
40+ python-compiler :
41+ build :
42+ context : ./Zivorp_Spike/docker/python
43+ image : python-compiler
44+ container_name : python-compiler
45+ entrypoint : [ "echo", "python-compiler image build only" ]
46+ networks :
47+ - debug-net
48+
49+ c-compiler :
50+ build :
51+ context : ./Zivorp_Spike/docker/c
52+ image : c-compiler
53+ container_name : c-compiler
54+ entrypoint : [ "echo", "c-compiler image build only" ]
55+ networks :
56+ - debug-net
57+
58+ java-compiler :
59+ build :
60+ context : ./Zivorp_Spike/docker/java
61+ image : java-compiler
62+ container_name : java-compiler
63+ entrypoint : [ "echo", "java-compiler image build only" ]
64+ networks :
65+ - debug-net
66+
67+ networks :
68+ debug-net :
69+ driver : bridge
Original file line number Diff line number Diff line change @@ -30,4 +30,4 @@ cat runtime_error.txt || echo "⚠️ runtime_error.txt 없음"
3030echo
3131
3232rm -f program output.txt compile_error.txt runtime_error.txt
33- exit $status
33+ exit $status
Original file line number Diff line number Diff line change 1- FROM openjdk:17
1+ FROM openjdk:17-jdk-slim
22WORKDIR /usr/src/app
33
44COPY entrypoint.sh /usr/src/app/entrypoint.sh
Original file line number Diff line number Diff line change @@ -30,4 +30,4 @@ cat runtime_error.txt || echo "⚠️ runtime_error.txt 없음"
3030echo
3131
3232rm -f Main.class output.txt compile_error.txt runtime_error.txt
33- exit $status
33+ exit $status
Original file line number Diff line number Diff line change 1- FROM python:3.11 -slim
1+ FROM python:3.9 -slim-bookworm
22
33WORKDIR /usr/src/app
44
55COPY entrypoint.sh /usr/src/app/entrypoint.sh
66
77RUN chmod +x /usr/src/app/entrypoint.sh
88
9- CMD ["bash" , "/usr/src/app/entrypoint.sh" ]
9+ CMD ["bash" , "/usr/src/app/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def echo():
5757
5858# 공통 코드 실행 함수
5959def execute_code (code , input_data , lang ):
60- base_dir = '/home/ec2-user/DebugVisual_Spike /server/code'
60+ base_dir = '/home/ec2-user/Zivorp_Spike /server/code'
6161 flask_dir = '/usr/src/app/code'
6262 os .makedirs (base_dir , exist_ok = True )
6363
You can’t perform that action at this time.
0 commit comments