-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yaml
70 lines (63 loc) · 2.1 KB
/
docker-compose.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
IMAGE: python:3.12-bullseye
volumes:
- .:${WORKSPACE:-/workspace}
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# db:
# image: pgvector/pgvector:pg16
# restart: unless-stopped
# volumes:
# - postgres-data:/var/lib/postgresql/data
# environment:
# POSTGRES_DB: postgres
# POSTGRES_USER: admin
# POSTGRES_PASSWORD: postgres
# ports:
# - "5432:5432"
# # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# # (Adding the "ports" property to this file will not forward from a Codespace.)
# volumes:
# postgres-data:
db:
build:
dockerfile: Dockerfile.u22
args:
BASE_IMAGE: ubuntu
BASE_VERSION: 22.04
BUILD_DEPS: build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
DEVEL_DEPS: curl git gpg clang-15 llvm-15-dev vim
POSTGRES_USER_ID: ${POSTGRES_USER_ID:-1000}
POSTGRES_USER_NAME: ${POSTGRES_USER_NAME:-postgres}
POSTGRES_USER_SHELL: ${POSTGRES_USER_SHELL:-/bin/bash}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGENV_VERSION: ${PGENV_VERSION:-1.3.7}
PG_VERSION: ${PG_VERSION:-16.4}
LLVM_CONFIG: /usr/bin/llvm-config-15
CLANG: /usr/bin/clang-15
RUNTIME_DEPS: locales libreadline8 zlib1g libxml2 libxslt1.1 libssl3 build-essential clang-15 llvm-15-dev
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- .:${WORKSPACE:-/workspace}
- ./vendor/age:/tmp/age-source
- pg_data:/home/postgres/.pgenv/pgsql/data
- type: tmpfs
target: /dev/shm
tmpfs:
size: 2g
ports:
- "5432:5432"
tmpfs:
- /dev/shm:size=2g
volumes:
pg_data:
driver: local