feat: setup project structure and dependencies - init Go module, add redis/sqlx deps, docker-compose config, basic project scaffold
This commit is contained in:
36
docker-compose.yml
Normal file
36
docker-compose.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- REDIS_ADDR=redis:6379
|
||||
- POSTGRES_DATABASE=trip_planner
|
||||
- POSTGRES_USER=trip_planner
|
||||
- POSTGRES_PASSWORD=trip_planner
|
||||
- POSTGRES_HOST=postgres
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
command: ["/api"]
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
- POSTGRES_DB=trip_planner
|
||||
- POSTGRES_USER=trip_planner
|
||||
- POSTGRES_PASSWORD=trip_planner
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user