-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
172 lines (166 loc) · 4.13 KB
/
compose.yaml
File metadata and controls
172 lines (166 loc) · 4.13 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
x-default-env: &default-env
POETRY_NO_INTERACTION: "1"
PIP_DEFAULT_TIMEOUT: "${PIP_DEFAULT_TIMEOUT:-300}"
PYTHONUNBUFFERED: "1"
x-platform: &platform ${DOCKER_PLATFORM:-linux/amd64}
x-default-args: &default-args
TZ: ${TZ:-Asia/Vladivostok}
DOCKER_HOST_UID: ${DOCKER_HOST_UID:-1000}
DOCKER_HOST_GID: ${DOCKER_HOST_GID:-1000}
DOCKER_USER: ${DOCKER_USER:-developer}
DOCKER_USER_HOME: ${DOCKER_USER_HOME:-/home/developer}
MIRROR_LIST_COUNTRY: ${MIRROR_LIST_COUNTRY:-RU}
BUILD_PACKAGES: ${BUILD_PACKAGES:-pyenv git gnupg sudo postgresql-libs mariadb-libs openmp}
VIM_PACKAGES: ${VIM_PACKAGES:-python vim vim-spell-en vim-spell-ru ctags ripgrep bat npm nodejs-lts-jod openai-codex gemini-cli}
CODE_SERVER_EXTENSIONS: ${CODE_SERVER_EXTENSIONS:-ms-python.python ms-pyright.pyright charliermarsh.ruff ms-toolsai.jupyter}
PYTHON_VERSION: ${PYTHON_VERSION:-3.14}
PIP_DEFAULT_TIMEOUT: ${PIP_DEFAULT_TIMEOUT:-300}
POETRY_VERSION: ${POETRY_VERSION:-2.3.2}
POETRY_OPTIONS_APP: ${POETRY_OPTIONS_APP:---only main --compile}
POETRY_OPTIONS_DEV: ${POETRY_OPTIONS_DEV:---no-root --with dev --compile}
x-shm: &default-shm
shm_size: 1g
x-vol-app: &vol-app
type: bind
source: .
target: /application
services:
python-base:
platform: *platform
build:
target: python-base
args: *default-args
environment:
<<: *default-env
poetry:
platform: *platform
entrypoint: poetry
build:
target: poetry
args: *default-args
environment:
<<: *default-env
volumes:
- *vol-app
- type: volume
source: pip-cache
target: /var/cache/pip
- type: volume
source: poetry-cache
target: /var/cache/pypoetry
dev:
platform: *platform
<<: *default-shm
build:
target: dev-build
args: *default-args
environment:
<<: *default-env
volumes:
- *vol-app
vim-ide:
platform: *platform
entrypoint: vim
build:
target: vim-ide
args: *default-args
environment:
<<: *default-env
volumes:
- *vol-app
gemini:
platform: *platform
entrypoint: gemini
build:
target: dev-build
args: *default-args
environment:
<<: *default-env
GEMINI_API_KEY: ${GEMINI_API_KEY}
volumes:
- *vol-app
- type: volume
source: gemini-auth
target: ${DOCKER_USER_HOME}/.gemini
codex:
platform: *platform
entrypoint: codex
build:
target: dev-build
args: *default-args
environment:
<<: *default-env
OPENAI_API_KEY: ${OPENAI_API_KEY}
volumes:
- *vol-app
- type: volume
source: codex-auth
target: ${DOCKER_USER_HOME}/.codex
codex-web-login:
platform: *platform
entrypoint:
- codex
- login
build:
target: dev-build
args: *default-args
environment:
<<: *default-env
network_mode: host
volumes:
- type: volume
source: codex-auth
target: ${DOCKER_USER_HOME:-/home/developer}/.codex
code-server:
platform: *platform
<<: *default-shm
entrypoint:
- code-server
- --bind-addr=${CODE_SERVER_HOST:-0.0.0.0}:${CODE_SERVER_PORT:-8443}
- --auth=${CODE_SERVER_AUTH:-password}
- /application
ports:
- "${CODE_SERVER_PORT:-8443}:${CODE_SERVER_PORT:-8443}"
build:
target: code-server
args: *default-args
environment:
<<: *default-env
PASSWORD: ${CODE_SERVER_PASSWORD:-change_me}
volumes:
- *vol-app
jupyterlab:
platform: *platform
<<: *default-shm
entrypoint:
- jupyter-lab
- --port=8888
- --ip=0.0.0.0
- --no-browser
- --IdentityProvider.token=${JUPYTER_TOKEN}
ports:
- "8888:8888"
build:
target: dev-build
args: *default-args
environment:
<<: *default-env
volumes:
- *vol-app
app:
platform: *platform
entrypoint: template_bin
build:
target: app-build
args: *default-args
environment:
<<: *default-env
volumes:
pip-cache:
driver: local
poetry-cache:
driver: local
codex-auth:
driver: local
gemini-auth:
driver: local