-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
71 lines (65 loc) · 1.99 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
version: "3.8"
# NOTE (JGMW): See the package.json on Brendan's PR for the scripts that can be helpful
# Testing inside console:
# curl -G -v "http://api:8911/graphql" --data-urlencode "query={redwood{version}}" -w "\n"
# curl -G -v "http://web:8910/" --data-urlencode "query={redwood{version}}" -w "\n"
services:
# Console notes:
# - Might not want to include by default
# - Can be useful to run commands without having all the dependencies installed locally
# - Can run using `docker compose run --rm console /bin/bash`
#
# This builds the base container. Useful for a 'console' to debug things with
console:
# we have to be root to share folders into the container, but if you're debugging
# an issue you should _not_ share the code and change this to docker to mimic production
user: root
build:
context: .
dockerfile: ./Dockerfile
target: console
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
# Redwood
redwood:
user: node
image: redwoodjs-project/api:latest
build:
context: .
dockerfile: ./Dockerfile
target: base
command: yarn rw dev
volumes:
- .:/home/node/app
- node_modules:/home/node/app/node_modules
ports:
- "8910:8910"
depends_on:
- db
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
# Postgres DB
db:
image: postgres:15-bookworm
environment:
POSTGRES_USER: redwood
POSTGRES_PASSWORD: redwood
POSTGRES_DB: redwood
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
# Volumes
volumes:
node_modules:
postgres: