initial commit
This commit is contained in:
commit
ebd5bb09fd
30 changed files with 1920 additions and 0 deletions
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
services:
|
||||
go-mad-database:
|
||||
image: postgres:15-alpine
|
||||
container_name: go-mad-postgres
|
||||
environment:
|
||||
POSTGRES_USER: mad
|
||||
POSTGRES_PASSWORD: mad
|
||||
POSTGRES_DB: mad
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U mad -d mad"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
go-mad:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: go-mad
|
||||
depends_on:
|
||||
go-mad-database:
|
||||
condition: service_healthy
|
||||
extra_hosts:
|
||||
- "go-mad-database:host-gateway"
|
||||
environment:
|
||||
GO_MAD_DATABASE_URL: postgres://mad:mad@go-mad-database:5432/mad?sslmode=disable
|
||||
GO_MAD_SERVER_PORT: "8080"
|
||||
GO_MAD_JWT_SECRET: change-me-to-a-32-plus-char-secret
|
||||
ports:
|
||||
- "8081:8080"
|
||||
volumes:
|
||||
postgres_data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue