diff --git a/Dockerfile b/Dockerfile index 122854d..5f18363 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM mahuntington/student:zsh +FROM mahuntington/student:postgres WORKDIR /home/student -CMD ["sudo", "pg_ctlcluster", "15", "main", "start"] +CMD ["pg_ctlcluster", "15", "main", "start", "--foreground"] +#RUN ["postgres", "-c", "max_connections=300"] diff --git a/compose.yaml b/compose.yaml index c3aaa75..b4fb11b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,8 +2,14 @@ version: '3' services: student: - image: mahuntington/student:zsh + image: mahuntington/student:postgres command: /bin/sh stdin_open: true tty: true container_name: student + links: + - postgres + + postgres: + image: mahuntington/student:postgres + command: ["pg_ctlcluster", "15", "main", "start", "--foreground"]