-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.backup.yml
62 lines (59 loc) · 1.52 KB
/
docker-compose.backup.yml
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
services:
redwood:
build:
context: .
dockerfile: ./Dockerfile
target: base
command: yarn rw dev
volumes:
- .:/home/node/app
- node_modules:/home/node/app/node_modules
ports:
- "8910:8910"
- "8911:8911"
- "8912:8912"
depends_on:
- db
environment:
- DATABASE_URL=postgresql://redwood:redwood@db:5432/postgres
- DIRECT_URL=postgresql://redwood:redwood@db:5432/postgres
- NODE_ENV=development
- SOCKET_PORT=8912
- REDWOOD_ENV_SOCKET_URL=http://0.0.0.0:8912
- REDWOOD_ENV_API_URL=http://0.0.0.0:8911
- REDWOOD_ENV_RELEASE_CYCLE=dev
- REDWOOD_API_HOST=0.0.0.0
db:
image: postgres:16-bookworm
environment:
POSTGRES_USER: redwood
POSTGRES_PASSWORD: redwood
POSTGRES_DB: redwood
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
# After starting with `docker compose -f ./docker-compose.dev.yml up`,
# use the console to run commands in the container:
#
# ```
# docker compose -f ./docker-compose.dev.yml run --rm -it console /bin/bash
# root@...:/home/node/app# yarn rw prisma migrate dev
# ```
console:
user: root
build:
context: .
dockerfile: ./Dockerfile
target: console
tmpfs:
- /tmp
command: "true"
environment:
- DATABASE_URL=postgresql://redwood:redwood@db:5432/postgres
- DIRECT_URL=postgresql://redwood:redwood@db:5432/postgres
depends_on:
- db
volumes:
node_modules:
postgres: