Skip to content

Commit 84ee67c

Browse files
committed
feat(deploy): Implement docker compose for production
1 parent 82a180f commit 84ee67c

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public/

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
FROM ghcr.io/getzola/zola:v0.21.0 AS build
22

33
ARG ZOLA_CONFIG=config.toml
4-
ENV ZOLA_CONFIG=${ZOLA_CONFIG}
54

65
WORKDIR /src
76

87
COPY . /src
98

9+
COPY ${ZOLA_CONFIG} config.toml
10+
1011
RUN [ "zola", "build" ]
1112

1213
FROM nginx:1.29.3-alpine
1314

1415
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
1516
COPY --from=build /src/public /usr/share/nginx/html/
1617

17-
EXPOSE 80
18+
EXPOSE 80 443

docker-compose.prod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3.9"
2+
name: rustlab-page
3+
services:
4+
www:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
args:
9+
ZOLA_CONFIG: ${ZOLA_CONFIG:-config.pjatk.toml}
10+
image: rustlab-page:latest
11+
ports:
12+
- "80:80"
13+
- "443:443"
14+
restart: unless-stopped

0 commit comments

Comments
 (0)