-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 917 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (41 loc) · 917 Bytes
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
version: "3.8"
services:
db:
container_name: "goChatDB"
image: postgres:14-alpine
volumes:
- "./database/postgres-data:/var/lib/postgresql/data:rw"
ports:
- "5433:5432"
environment:
POSTGRES_DB: "go_chat_db"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
restart: unless-stopped
server:
container_name: "goChatServer"
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- secretKey=your-secret-key-here
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=go_chat_db
depends_on:
- db
restart: unless-stopped
client:
container_name: "goChatClient"
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- server
restart: unless-stopped