Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
75 lines (70 loc) · 1.91 KB
/
Copy pathcompose.yml
File metadata and controls
75 lines (70 loc) · 1.91 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
name: memory-mall
volumes:
postgres_vol: { }
express_node_modules: { }
express_root_node_modules: { }
nuxt_node_modules: { }
nuxt_root_node_modules: { }
services:
mm-nuxt:
build:
context: .
dockerfile: nuxt.dockerfile # image: node:24
working_dir: /app/frontend
ports:
- "3001:3000"
command: npm run dev
volumes:
- .:/app
- nuxt_root_node_modules:/app/node_modules
- nuxt_node_modules:/app/frontend/node_modules
env_file:
- ./.env
restart: no
depends_on:
- mm-express
# Use `docker compose exec mm-express npm run 'command'` to run the drizzle-orm CLI
# commands from /backend/package.json inside the postgres container
mm-express:
build:
context: .
dockerfile: express.dockerfile # image: node:24
working_dir: /app/backend
ports:
- "3000:3000" # express server TODO: should be 127.0.0.1:3000 for prod
- "4983:4983" # drizzle-orm
# TODO: Drizzle-studio is not reachable by the HOST, gives back 404.
command: npm run dev
volumes:
- .:/app
- express_root_node_modules:/app/node_modules
- express_node_modules:/app/backend/node_modules
env_file:
- ./.env
restart: no
depends_on:
- mm-postgres
mm-postgres:
image: postgres:16
ports:
- "5432:5432"
environment:
POSTGRES_DB: MemoryMallDB
POSTGRES_USER: appuser
POSTGRES_PASSWORD: database123
volumes:
- postgres_vol:/var/lib/postgresql/data
- ./backend/migrations:/docker-entrypoint-initdb.d/ # Import all drizzle-orm migrations on first init
restart: no
mm-pg-admin:
image: dpage/pgadmin4:9
ports:
- "8080:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@local.dev
PGADMIN_DEFAULT_PASSWORD: admin123
volumes:
- ./backend/src/db/servers.json:/pgadmin4/servers.json
restart: no
depends_on:
- mm-postgres