-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (43 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
47 lines (43 loc) · 1.08 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
version: '3'
services:
payload:
image: node:20-alpine
ports:
- '3000:3000'
volumes:
- .:/home/node/app
- node_modules:/home/node/app/node_modules
working_dir: /home/node/app/
command: sh -c "corepack enable && corepack prepare pnpm@9.0.0 --activate && pnpm install && pnpm dev"
depends_on:
- postgres
# - mongo
env_file:
- .env
# Ensure your DATABASE_URI uses 'postgresql' as the hostname ie. postgresql://127.0.0.1:5432/your-database-name
postgres:
restart: always
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- '5432:5432'
environment:
POSTGRES_USER: postgres
POSTGRES_DB: your-database-name # THIS MUST MATCH YOUR DB NAME IN .env
POSTGRES_HOST_AUTH_METHOD: trust
# Uncomment the following to use mongodb
# mongo:
# image: mongo:latest
# ports:
# - '27017:27017'
# command:
# - --storageEngine=wiredTiger
# volumes:
# - data:/data/db
# logging:
# driver: none
volumes:
pgdata:
# data:
node_modules: