-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.53 KB
/
docker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# ---------------------------------------------------------------------------------
# NOTE: Docker Compose is NOT necessary for the development process right now.
# This file is reserved for potential usage in the future.
# ---------------------------------------------------------------------------------
services:
# NOTE: we recommend building the app outside of Docker for development purpose, as it is faster
# oxy:
# build:
# context: .
# dockerfile: Dockerfile
# target: runtime
# ports:
# - "3000:3000"
# volumes:
# - oxy-data:/var/lib/oxy/data
# # Mount the examples folder as the working directory
# - ./examples:/app:rw
# env_file:
# - .env
# environment:
# - OXY_STATE_DIR=/var/lib/oxy/data
# # - OXY_DATABASE_URL=postgresql://admin:password@postgres:5432/default
# working_dir: /app
# depends_on:
# postgres:
# condition: service_healthy
postgres:
image: postgres:18-alpine
container_name: postgres
hostname: postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_DB: default
# PostgreSQL 18+ requires PGDATA in a version-specific subdirectory
PGDATA: /var/lib/postgresql/18/docker
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "admin", "-d", "default"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
# oxy-data:
postgres-data: