Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10384351
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
View Options
diff --git a/Dockerfile.prod b/Dockerfile.prod
new file mode 100644
index 0000000..18cde43
--- /dev/null
+++ b/Dockerfile.prod
@@ -0,0 +1,34 @@
+FROM golang:alpine AS build
+
+LABEL org.opencontainers.image.source="https://github.com/writefreely/writefreely"
+LABEL org.opencontainers.image.description="WriteFreely is a clean, minimalist publishing platform made for writers. Start a blog, share knowledge within your organization, or build a community around the shared act of writing."
+
+RUN apk update --no-cache && \
+ apk upgrade --no-cache && \
+ apk add --no-cache nodejs npm make g++ git sqlite-dev patch && \
+ npm install -g less less-plugin-clean-css && \
+ mkdir -p /go/src/github.com/writefreely/writefreely
+
+COPY . /go/src/github.com/writefreely/writefreely
+WORKDIR /go/src/github.com/writefreely/writefreely
+ENV NODE_OPTIONS=--openssl-legacy-provider
+RUN cat ossl_legacy.cnf >> /etc/ssl/openssl.cnf && \
+ make build && \
+ make ui
+
+FROM alpine
+
+RUN apk update --no-cache && \
+ apk upgrade --no-cache && \
+ apk add --no-cache openssl ca-certificates && \
+ mkdir /usr/share/writefreely
+
+COPY --from=build /go/src/github.com/writefreely/writefreely/cmd/writefreely/writefreely /usr/bin
+COPY --from=build /go/src/github.com/writefreely/writefreely/pages /usr/share/writefreely/pages
+COPY --from=build /go/src/github.com/writefreely/writefreely/static /usr/share/writefreely/static
+COPY --from=build /go/src/github.com/writefreely/writefreely/templates /usr/share/writefreely/templates
+
+ENV WRITEFREELY_DOCKER=True
+ENV HOME=/data
+WORKDIR /data
+CMD ["/usr/bin/writefreely"]
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
new file mode 100644
index 0000000..ef85671
--- /dev/null
+++ b/docker-compose.prod.yml
@@ -0,0 +1,25 @@
+services:
+ app:
+ image: writefreely
+ container_name: writefreely
+ volumes:
+ - ./data:/data
+ ports:
+ - 127.0.0.1:8080:8080
+ depends_on:
+ - db
+ restart: unless-stopped
+
+ db:
+ image: lscr.io/linuxserver/mariadb
+ container_name: writefreely-mariadb
+ volumes:
+ - ./db:/config
+ environment:
+ - PUID=65534
+ - PGID=65534
+ - TZ=Etc/UTC
+ - MYSQL_DATABASE=writefreely
+ - MYSQL_USER=writefreely
+ - MYSQL_PASSWORD=P@ssw0rd
+ restart: unless-stopped
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 23, 1:56 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3103895
Attached To
rWF WriteFreely
Event Timeline
Log In to Comment