Skip to content

Commit c49bbf4

Browse files
committed
run home on nginx
1 parent d69c397 commit c49bbf4

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

services/home/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
FROM python:3.8.10-slim-buster
1+
# Builder
2+
FROM python:3.12-slim-bullseye as build-stage
23

34
LABEL maintainer="Just van den Broecke <[email protected]>"
45

5-
RUN pip install mkdocs
6-
76
COPY ./docs/ /docs/
87

9-
WORKDIR /docs/
10-
11-
EXPOSE 8000
8+
RUN cd /docs && pip install mkdocs && mkdir /var/www && mkdocs build -d /var/www
129

13-
CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"]
10+
# Deployer
11+
FROM nginx:stable-alpine as production-stage
12+
LABEL maintainer="Just van den Broecke <[email protected]>"
13+
COPY --from=build-stage /var/www /usr/share/nginx/html
14+
EXPOSE 80
15+
CMD ["nginx", "-g", "daemon off;"]

services/home/docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.3'
21

32
services:
43

@@ -8,8 +7,8 @@ services:
87

98
container_name: home
109

11-
expose:
12-
- "8000"
10+
# expose:
11+
# - "8000"
1312

1413
# ports:
1514
# - "5000:8000"

services/traefik/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
version: '3.3'
21

32
services:
43
proxy:
5-
image: traefik:v2.9.9
4+
image: traefik:v2.11.0
65

76
container_name: traefik
87

0 commit comments

Comments
 (0)