forked from freeCodeCamp/chapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (37 loc) · 902 Bytes
/
docker-compose.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
version: "3.7"
services:
db:
image: postgres:14
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "54320:5432"
app:
env_file: .env
depends_on:
- db
platform: "linux/amd64"
build:
context: .
dockerfile: server.Dockerfile
working_dir: /usr/chapter/server
environment:
- DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
- EMAIL_HOST=mailhog
ports:
- "5000:5000"
client:
depends_on:
- app
build:
context: .
dockerfile: client.Dockerfile
ports:
- "3000:3000"
working_dir: /usr/chapter/client
# on remote environments, NEXT_PUBLIC_APOLLO_SERVER in .env needs to include the
# remote address. e.g. https://example.com:5000
environment:
NEXT_PUBLIC_APOLLO_SERVER: