Skip to content
This repository was archived by the owner on Mar 10, 2021. It is now read-only.

Commit 5ccdae5

Browse files
authored
refactor: Update folder structure (#7)
1 parent df1a332 commit 5ccdae5

File tree

6 files changed

+3919
-9
lines changed

6 files changed

+3919
-9
lines changed

binder/Dockerfile renamed to Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ RUN wget -q "https://github.com/sosedoff/pgweb/releases/download/v${PGWEB_VERSIO
1717
USER "${NB_USER}"
1818
WORKDIR "${HOME}"
1919
RUN python3 -m pip install git+https://github.com/illumidesk/jupyter-pgweb-proxy.git
20-
RUN jupyter serverextension enable --sys-prefix jupyter_server_proxy \
21-
&& jupyter labextension install @jupyterlab/server-proxy \
22-
&& jupyter lab build
20+
RUN jupyter serverextension enable --sys-prefix jupyter_server_proxy
2321

2422
# copy configs, update permissions as root
2523
USER root

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ help:
2525
@grep -E '^[a-zA-Z0-9_%/-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2626

2727
build: ## build the latest image for a stack
28-
${VENV_BIN}/jupyter-repo2docker --no-run --user-id 1000 --user-name jovyan --image-name $(OWNER)/pgweb:$(TAG) ./binder .
28+
${VENV_BIN}/jupyter-repo2docker --no-run --user-id 1000 --user-name jovyan --image-name $(OWNER)/pgweb:$(TAG) .
2929
@echo -n "Built image size: "
3030
@docker images $(OWNER)/pgweb:$(TAG) --format "{{.Size}}"
3131

3232
clean-all: ## remove built images and running containers (including those w/ exit status)
3333
@docker rm -f $(shell docker ps -aq)
3434

3535
dev: venv ## run one of the containers (stacks) on port 8889
36-
docker-compose -f binder/docker-compose.yaml up -d --build
36+
docker-compose -f docker-compose.yaml up -d --build
3737

3838
dev-down:venv ## stop (down) the docker-compose services
39-
docker-compose -f binder/docker-compose.yaml down
39+
docker-compose -f docker-compose.yaml down
4040

4141
lint: venv ## lint the dockerfile(s)
4242
@echo "Linting Dockerfiles with Hadolint in ..."
43-
@git ls-files --exclude='Dockerfile*' --ignored binder/docker-compose.yaml | grep -v ppc64 | xargs -L 1 $(HADOLINT) --config .hadolint.yml
43+
@git ls-files --exclude='Dockerfile*' --ignored docker-compose.yaml | grep -v ppc64 | xargs -L 1 $(HADOLINT) --config .hadolint.yml
4444
@echo "Linting with Hadolint done!"
4545
@echo "Linting tests with flake8 ..."
4646
${VENV_BIN}/flake8

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ make dev
3434

3535
For example, with the `Scheme` option the string would look like so:
3636

37-
```
38-
postgres://postgres:postgres@testdb:5432/db?sslmode=disable
37+
```bash
38+
postgres://postgres:postgres@testdb:5432/postgres?sslmode=disable
3939
```
4040

4141
### Cleanup

binder/docker-compose.yaml renamed to docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919
- POSTGRES_PASSWORD=postgres
2020
volumes:
2121
- db:/var/lib/postgresql/data
22+
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
2223

2324
volumes:
2425
db:
File renamed without changes.

0 commit comments

Comments
 (0)