-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.dev.yml
56 lines (50 loc) · 1.1 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
version: "3.4"
#### Docker delete All + Cache #####
# docker system prune -a
### Build DockerFile ###
# docker build -t nextjs .
### Docker run Container ###
# docker run -p 3000:3000 nextjs
### SSH in to Image ###
# docker run -it server sh
services:
web:
ports:
- 3000:3000
build:
context: web/
dockerfile: Dockerfile
target: dev
restart: always
volumes:
- ./web:/app
- /app/node_modules
- /app/.next
server:
ports:
- 4001:4001
build:
context: server/
dockerfile: Dockerfile
target: dev
restart: always
depends_on:
- db
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/echat
- SERVER_PORT=4001
- SESSION_SECRET=qowiueojwojfalksdjoqiwueo
- CORS_ORIGIN=http://localhost:3000
volumes:
- ./server:/app
- /app/node_modules
db:
image: postgres:14.1-alpine
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=echat
volumes:
- ~/pgdata:/var/lib/postgresql/data
ports:
- 5432:5432