-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.dev.yml
106 lines (99 loc) · 2.67 KB
/
docker-compose.dev.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
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
version: "3.8"
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"
- "5555:5555"
depends_on:
- db
networks:
- redwood
environment:
- DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood
- TEST_DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood_test
- SESSION_SECRET=super_secret_session_key_change_me_in_production_please
- CI=
- NODE_ENV=development
db:
image: postgres:15-bookworm
environment:
POSTGRES_USER: redwood
POSTGRES_PASSWORD: redwood
POSTGRES_DB: redwood
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
networks:
- redwood
# 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
volumes:
- .:/home/node/app
- node_modules:/home/node/app/node_modules
tmpfs:
- /tmp
command: "true"
environment:
- DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood
- TEST_DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood_test
depends_on:
- db
# docker compose -f ./docker-compose.dev.yml run --rm -it python-console /bin/bash
python-console:
user: root
build:
context: .
dockerfile: ./Dockerfile
target: python-console
volumes:
- .:/home/node/app
tmpfs:
- /tmp
command: "true"
environment:
- DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood
- TEST_DATABASE_URL=postgresql://redwood:redwood@db:5432/redwood_test
depends_on:
- db
localstack:
container_name: "cpf-localstack_main"
image: localstack/localstack
ports:
- 4566:4566 # LocalStack Gateway
- 4510-4559:4510-4559 # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_DEFAULT_REGION=${AWS_REGION:-us-west-2}
networks:
- redwood
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./localstack/entrypoint/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh"
networks:
redwood:
driver: bridge
volumes:
node_modules:
postgres: