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:
Roy Crihfield 2023-06-01 20:07:37 +08:00
parent dcd911a8ff
commit 5b92e02ebd
4 changed files with 5 additions and 45 deletions

View File

@ -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.
@ -75,4 +75,4 @@ jobs:
# - uses: actions/checkout@v2 # - uses: actions/checkout@v2
# - name: Test migration # - name: Test migration
# run: | # run: |
# timeout 5m make test-migrations # timeout 5m make test-migrations

View File

@ -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

View File

@ -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:

View File

@ -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"