Docker compose cleanup
- preferred naming convenion is compose.yaml - test compose was redundant - uncomment build section for convenience, since it's only used as a fallback
This commit is contained in:
parent
dcd911a8ff
commit
5b92e02ebd
2
.github/workflows/on-pr.yaml
vendored
2
.github/workflows/on-pr.yaml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Run docker build
|
- name: Run docker build
|
||||||
run: make docker-build
|
run: docker compose build
|
||||||
test:
|
test:
|
||||||
# Add a dummy job to avoid failing GitHub CI checks.
|
# Add a dummy job to avoid failing GitHub CI checks.
|
||||||
# Other checks to be added later.
|
# Other checks to be added later.
|
||||||
|
11
Makefile
11
Makefile
@ -111,17 +111,6 @@ import:
|
|||||||
test -n "$(NAME)" # $$NAME
|
test -n "$(NAME)" # $$NAME
|
||||||
psql $(NAME) < schema.sql
|
psql $(NAME) < schema.sql
|
||||||
|
|
||||||
|
|
||||||
## Build docker image with schema
|
|
||||||
.PHONY: docker-build
|
|
||||||
docker-build:
|
|
||||||
docker-compose -f docker-compose.test.yml build
|
|
||||||
|
|
||||||
# ## Build docker image for migration
|
|
||||||
# .PHONY: docker-concise-migration-build
|
|
||||||
# docker-concise-migration-build:
|
|
||||||
# docker build -t cerc/concise-migration-build -f ./db/Dockerfile .
|
|
||||||
|
|
||||||
.PHONY: test-migrations
|
.PHONY: test-migrations
|
||||||
test-migrations: $(GOOSE)
|
test-migrations: $(GOOSE)
|
||||||
./scripts/test_migration.sh
|
./scripts/test_migration.sh
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
migrations:
|
migrations:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipld-eth-db
|
- ipld-eth-db
|
||||||
# Use local build
|
# Use local build
|
||||||
#build:
|
build:
|
||||||
#context: .
|
context: .
|
||||||
#dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# Use an existing image
|
# Use an existing image
|
||||||
image: cerc/ipld-eth-db
|
image: cerc/ipld-eth-db
|
||||||
environment:
|
environment:
|
@ -1,27 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
migrations:
|
|
||||||
restart: on-failure
|
|
||||||
depends_on:
|
|
||||||
- ipld-eth-db
|
|
||||||
image: cerc/ipld-eth-db
|
|
||||||
# Build image using local context
|
|
||||||
build: .
|
|
||||||
environment:
|
|
||||||
DATABASE_USER: "vdbm"
|
|
||||||
DATABASE_NAME: "cerc_testing"
|
|
||||||
DATABASE_PASSWORD: "password"
|
|
||||||
DATABASE_HOSTNAME: "ipld-eth-db"
|
|
||||||
DATABASE_PORT: 5432
|
|
||||||
|
|
||||||
ipld-eth-db:
|
|
||||||
image: timescale/timescaledb:latest-pg14
|
|
||||||
restart: always
|
|
||||||
command: ["postgres", "-c", "log_statement=all"]
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: "vdbm"
|
|
||||||
POSTGRES_DB: "cerc_testing"
|
|
||||||
POSTGRES_PASSWORD: "password"
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:8077:5432"
|
|
Loading…
Reference in New Issue
Block a user