Skip to content

Commit

Permalink
DB for server test
Browse files Browse the repository at this point in the history
  • Loading branch information
daemonl committed Jun 7, 2024
1 parent dfc3950 commit d2f68a3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker-compose.test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
version: '2.4'

services:
database:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 5s
timeout: 10s
retries: 5

test:
image: golang:1.22
links:
- database
volumes:
- ".:/src"
environment:
TEST_DB: "postgres://test:test@database/test?sslmode=disable"
working_dir: "/src"
command: "go test ./..."

0 comments on commit d2f68a3

Please sign in to comment.