diff --git a/.gitignore b/.gitignore index 7519abc..a5a9dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ stash-box-config.yml # TODO - we'll add this in later vendor +docker/production/.env diff --git a/docker/production/.env.example b/docker/production/.env.example new file mode 100644 index 0000000..6dbd793 --- /dev/null +++ b/docker/production/.env.example @@ -0,0 +1,3 @@ +POSTGRES_USER= +POSTGRES_PASSWORD= +POSTGRES_DB=stash-box \ No newline at end of file diff --git a/docker/production/docker-compose.yml b/docker/production/docker-compose.yml index 900aed8..d04a28e 100644 --- a/docker/production/docker-compose.yml +++ b/docker/production/docker-compose.yml @@ -1,16 +1,12 @@ -version: '3.8' - services: postgres: container_name: postgres build: ./postgres restart: always - environment: - POSTGRES_USER: - POSTGRES_PASSWORD: - POSTGRES_DB: + env_file: + - .env volumes: - - /pgdata:/var/lib/postgresql/data + - ./pgdata:/var/lib/postgresql/data stash-box: container_name: stash-box @@ -24,7 +20,7 @@ services: links: - postgres volumes: - - :/root/.stash-box + - ./config:/root/.stash-box labels: - traefik.http.routers.stash-box.rule=Host(``) - traefik.http.routers.stash-box.tls=true diff --git a/docker/production/postgres/Dockerfile b/docker/production/postgres/Dockerfile index 6b66819..192b98f 100644 --- a/docker/production/postgres/Dockerfile +++ b/docker/production/postgres/Dockerfile @@ -1,6 +1,6 @@ FROM postgres:14.2 -RUN buildDeps='git make gcc postgresql-server-dev-14' \ +RUN buildDeps='git make gcc postgresql-server-dev-14 clang-11' \ && apt update && apt install -y $buildDeps --no-install-recommends --reinstall ca-certificates \ && git clone https://github.com/fake-name/pg-spgist_hamming.git \ && make -C pg-spgist_hamming/bktree \