-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathcompose.yml
More file actions
48 lines (45 loc) · 1.2 KB
/
compose.yml
File metadata and controls
48 lines (45 loc) · 1.2 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
services:
app:
build:
context: .
dockerfile: Containerfile.dev
working_dir: /app
tty: true # allocates a pseudo-TTY for interactive IEx
stdin_open: true # keeps STDIN open even if not attached
mem_limit: 4g
env_file: .env
command: mix phx.server
environment:
- NODE_OPTIONS=--max-old-space-size=4096
- "USER=${USER}"
ports:
- "${CODEBATTLE_PORT}:${CODEBATTLE_PORT}"
- "8080:8080"
volumes:
- ".:/app:z"
- "~/.bash_history:/root/.bash_history:z"
- ".bashrc:/root/.bashrc:z"
- "/var/tmp:/var/tmp:z"
- "/tmp:/tmp:z"
depends_on:
- db
db:
image: postgres:18-alpine
environment:
POSTGRES_USER: ${CODEBATTLE_DB_USERNAME}
POSTGRES_PASSWORD: ${CODEBATTLE_DB_PASSWORD}
volumes:
- pg_data18:/var/lib/postgresql/data
# same db but forwards port to host
db-local:
image: postgres:18-alpine
ports:
- "5432:${CODEBATTLE_DB_PORT}"
environment:
POSTGRES_USER: ${CODEBATTLE_DB_USERNAME}
POSTGRES_PASSWORD: ${CODEBATTLE_DB_PASSWORD}
command: postgres -c 'max_connections=1000'
volumes:
- pg_data18:/var/lib/postgresql/data
volumes:
pg_data18: