File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed
Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM alpine:latest AS build-stage
2+
3+ RUN apk add --no-cache make g++
4+
5+ COPY . /app
6+
7+ RUN make -C /app fclean custom ARG="-static -O3"
8+
9+ # FROM alpine:latest AS production-stage
10+ FROM alpine:latest AS production-stage
11+
12+ COPY --from=build-stage /app/bin/webserv /usr/bin/webserv
13+ COPY --from=build-stage /app/conf/webserv.conf /etc/webserv/
14+ COPY --from=build-stage /app/conf/mime.types /etc/webserv/
15+ COPY --from=build-stage /app/conf/sites-available/default.conf /etc/webserv/sites-available/
16+
17+ RUN mkdir /etc/webserv/sites-enabled
18+ RUN ln -s /etc/webserv/sites-available/default.conf /etc/webserv/sites-enabled/
19+
20+ RUN mkdir -p /var/www/html
21+ COPY --from=build-stage /app/websites/default/index.html /var/www/html/
22+
23+ EXPOSE 8080
24+
25+ CMD ["/usr/bin/webserv" ]
Original file line number Diff line number Diff line change 1+ server {
2+ listen 0.0.0.0:8080;
3+
4+ root /var/www/html;
5+
6+ index index.html index.htm;
7+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < title > Welcome to webserv!</ title >
6+ < style >
7+ html {
8+ color-scheme : light dark;
9+ }
10+
11+ body {
12+ width : 35em ;
13+ margin : 0 auto;
14+ font-family : Tahoma, Verdana, Arial, sans-serif;
15+ }
16+ </ style >
17+ </ head >
18+
19+ < body >
20+ < h1 > Welcome to webserv!</ h1 >
21+ < p > If you see this page, the webserv web server is successfully installed and
22+ working. Further configuration is required.</ p >
23+
24+ < p > For online documentation and support please refer to
25+ < a href ="https://github.com/PythonGermany/42_webserv?tab=readme-ov-file#introduction "> github.com</ a > .< br />
26+ Commercial support is not available at
27+ < a href ="https://github.com/PythonGermany/42_webserv "> github.com</ a > .
28+ </ p >
29+
30+ < p > < em > Thank you for using webserv.</ em > </ p >
31+ </ body >
32+
33+ </ html >
You can’t perform that action at this time.
0 commit comments