|
1 | 1 | version: '3.8' |
2 | | - |
3 | 2 | services: |
4 | | - # SQLite variant (single container) |
5 | | - ocm-sqlite: |
6 | | - build: . |
7 | | - image: ocm-cert-manager:latest |
8 | | - container_name: ocm-sqlite |
9 | | - ports: |
10 | | - - "8080:8080" |
11 | | - volumes: |
12 | | - - ocm-data:/app/data |
13 | | - environment: |
14 | | - - OCM_LOG_LEVEL=info |
15 | | - - OCM_DB_TYPE=sqlite |
16 | | - - OCM_DB_SQLITE_PATH=/app/data/ocm.db |
| 3 | + # Open Certificate Manager |
| 4 | + ocm: |
| 5 | + image: robcowart/ocm:latest |
| 6 | + container_name: ocm |
17 | 7 | restart: unless-stopped |
18 | | - |
19 | | - # PostgreSQL variant |
20 | | - ocm-postgres: |
21 | | - build: . |
22 | | - image: ocm-cert-manager:latest |
23 | | - container_name: ocm-postgres |
| 8 | + hostname: ocm |
24 | 9 | ports: |
25 | | - - "8081:8080" |
26 | | - depends_on: |
27 | | - - postgres |
28 | | - environment: |
29 | | - - OCM_LOG_LEVEL=info |
30 | | - - OCM_DB_TYPE=postgres |
31 | | - - OCM_DB_POSTGRES_HOST=postgres |
32 | | - - OCM_DB_POSTGRES_PORT=5432 |
33 | | - - OCM_DB_POSTGRES_DATABASE=ocm |
34 | | - - OCM_DB_POSTGRES_USER=ocm |
35 | | - - OCM_DB_POSTGRES_PASSWORD=ocm_password |
36 | | - - OCM_DB_POSTGRES_SSL_MODE=disable |
37 | | - restart: unless-stopped |
38 | | - |
39 | | - postgres: |
40 | | - image: postgres:16-alpine |
41 | | - container_name: ocm-postgres-db |
42 | | - environment: |
43 | | - - POSTGRES_DB=ocm |
44 | | - - POSTGRES_USER=ocm |
45 | | - - POSTGRES_PASSWORD=ocm_password |
| 10 | + - 8000:8000 |
46 | 11 | volumes: |
47 | | - - postgres-data:/var/lib/postgresql/data |
48 | | - restart: unless-stopped |
49 | | - |
50 | | -volumes: |
51 | | - ocm-data: |
52 | | - postgres-data: |
| 12 | + # Update this to the path to the data directory on your host machine |
| 13 | + - ./data:/app/data |
| 14 | + environment: |
| 15 | + LOG_LEVEL: info |
| 16 | + |
| 17 | + # SQLite Configuration (Default) - Comment out these two lines to use PostgreSQL instead |
| 18 | + OCM_DB_TYPE: sqlite |
| 19 | + OCM_DB_SQLITE_PATH: /app/data/ocm.db |
| 20 | + |
| 21 | + # PostgreSQL Configuration - Uncomment the lines below to use PostgreSQL and add postgres to depends_on |
| 22 | + # OCM_DB_TYPE: postgres |
| 23 | + # OCM_DB_POSTGRES_HOST: postgres |
| 24 | + # OCM_DB_POSTGRES_PORT: 5432 |
| 25 | + # OCM_DB_POSTGRES_DATABASE: ocm |
| 26 | + # OCM_DB_POSTGRES_USER: ocm |
| 27 | + # OCM_DB_POSTGRES_PASSWORD: ocm_password |
| 28 | + # OCM_DB_POSTGRES_SSL_MODE: disable |
0 commit comments