From 7fa9017d25ec7b83e5f4e411f6757d15613dd7b1 Mon Sep 17 00:00:00 2001 From: Jeremiah Butler Date: Thu, 18 Mar 2021 15:53:38 +0000 Subject: [PATCH] add docker-compose --- .gitignore | 2 ++ docker-compose.yml | 32 ++++++++++++++++++++++++++++++++ Dockerfile => docker/Dockerfile | 6 +++--- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 docker-compose.yml rename Dockerfile => docker/Dockerfile (82%) diff --git a/.gitignore b/.gitignore index 0d5f77bdf..9d4e97e15 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ webapp/cypress/videos server/swagger/clients server/vendor .idea +certs +data diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..a0010728a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,32 @@ +version: "3" +services: + app: + build: + context: ./docker + container_name: focalboard + expose: + - 8000 + environment: + - VIRTUAL_HOST=focalboard.local + - VIRTUAL_PORT=8000 + + proxy: + image: jwilder/nginx-proxy:latest + container_name: focalboard-proxy + ports: + - 443:443 + volumes: + - "./certs:/etc/nginx/certs:ro" + - "/var/run/docker.sock:/tmp/docker.sock:ro" + + postgres: + image: postgres:latest + container_name: focalboard-postgres + restart: always + volumes: + - "./data:/var/lib/postgresql/data" + environment: + POSTGRES_DB: boards + POSTGRES_USER: boarduser + POSTGRES_PASSWORD: board-password + diff --git a/Dockerfile b/docker/Dockerfile similarity index 82% rename from Dockerfile rename to docker/Dockerfile index 9ccb5988b..50b3a8085 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:latest +FROM ubuntu:20.04 # Make sure that the underlying container is patched to the latest versions -RUN apt update && \ - apt install -y wget tar gzip unzip file +RUN apt-get update && \ + apt-get install -y wget tar unzip gzip file # Now install Focalboard as a seperate layer RUN wget https://releases.mattermost.com/focalboard/0.5.0/focalboard-server-linux-amd64.tar.gz && \