Skip to content

Commit

Permalink
Provide Docker Compose file for quick app+db setup
Browse files Browse the repository at this point in the history
Closes #311
  • Loading branch information
HarveyKandola committed Aug 29, 2019
1 parent 66e11ce commit 44febcc
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
@@ -1,8 +1,7 @@
FROM golang:1.12-alpine as builder
COPY . /go/src/github.com/documize/community

RUN cd /go/src/github.com/documize/community && \
env GOOS=linux GOARCH=amd64 GODEBUG=tls13=1 go build -o bin/documize-community-linux-amd64 ./edition/community.go
RUN cd /go/src/github.com/documize/community
RUN env GOOS=linux GOARCH=amd64 GODEBUG=tls13=1 go build -o bin/documize-community-linux-amd64 ./edition/community.go

# build release image
FROM alpine:3.10
Expand Down
50 changes: 50 additions & 0 deletions docker-compose.yaml
@@ -0,0 +1,50 @@
# This Docker Compose file will start up Documize with PostgreSQL.
#
# Use 'documize-enterprise-linux-amd64' for Enterprise Edition (default).
# Use 'documize-community-linux-amd64' for Community Edition.
#
# You can move between editions anytime without any data loss
# because of the common database schema.
#
# The latest product release executable will be pulled down
# from a public Amazon S3 bucket.
#
# Use 'docker-compose up|down' to start or stop containers.
version: "3"

services:
db:
image: postgres:latest
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: documize
POSTGRES_PASSWORD: Passw0rd
POSTGRES_DB: documize
volumes:
- db-data:/var/lib/postgresql/data
networks:
- documizenet

app:
image: debian:latest
command: /bin/sh -c "apt-get -qq update && apt-get -qq install -y wget && wget https://documize.s3-eu-west-1.amazonaws.com/downloads/documize-enterprise-linux-amd64 && chmod 777 ./documize-enterprise-linux-amd64 && ./documize-enterprise-linux-amd64"
depends_on:
- db
ports:
- 5001:5001
environment:
DOCUMIZEPORT: 5001
DOCUMIZEDB: host=db port=5432 dbname=documize user=documize password=Passw0rd sslmode=disable
DOCUMIZEDBTYPE: postgresql
DOCUMIZESALT: hsk3Acndky8cdTNx3
DOCUMIZELOCATION: selfhost
networks:
- documizenet

volumes:
db-data:

networks:
documizenet:

0 comments on commit 44febcc

Please sign in to comment.