-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (47 loc) · 971 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
38
39
40
41
42
43
44
45
46
47
48
version: '3.7'
services:
db:
container_name: neoway_db
image: postgres:15.0
restart: always
env_file:
- ./api/.env
environment:
POSTGRES_USER: $DB_USER
POSTGRES_PASSWORD: $DB_PASS
PGDATA: /data/postgres
POSTGRES_DB: $DB_NAME
ports:
- $DB_PORT:5432
networks:
- neoway.challenge
api:
build:
context: api/.
container_name: neoway_api
restart: always
env_file:
- ./api/.env
environment:
# When run with docker, DB_HOST must be exactly container_name of the db service(eg: neoway_db).
- WAIT_HOSTS=$DB_HOST:5432
ports:
- $SERVER_PORT:4444
networks:
- neoway.challenge
depends_on:
- db
spa:
build:
context: spa/.
container_name: neoway_spa
restart: always
env_file:
- ./spa/.env
ports:
- 8080:8080
networks:
- neoway.challenge
networks:
neoway.challenge:
driver: 'bridge'