generated from pure_sagacity/turborepo-starter-project
9c56d278e6
removed zod because elysia has it built in changed compose.yml to docker-compose.yml because my icon shows it as docker-compose that way
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
services:
|
|
client:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/client/Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- 3000:3000
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL="http://server:3000"
|
|
depends_on:
|
|
- server
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/server/Dockerfile
|
|
restart: unless-stopped
|
|
# Don't need to expose ports for the server since it's only accessed by the client and not directly by the user
|
|
environment:
|
|
- BETTER_AUTH_URL="http://localhost:3000"
|
|
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
postgres:
|
|
image: postgres:13
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
# Don't need to expose ports for the database since it's only accessed by the server and not directly by the user
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 1m30s
|
|
timeout: 30s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
postgres-data:
|