-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathdocker-compose.dev.yml
81 lines (80 loc) · 2 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3.8"
services:
server:
image: pern-store-server
container_name: pern-store-server
build:
context: ./server
dockerfile: Dockerfile
# restart: always
env_file:
- ./server/.env
environment:
- POSTGRES_HOST=3.84.191.228
- POSTGRES_DB=pernstore
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=newpassword
volumes:
# Maps the server directory to
# the working directory in the container
- ./server:/usr/src/app
# Maps the node_modules directory to
# the working directory in the container
# and also fixes bcrypt error
- /usr/src/app/node_modules
ports:
- 9000:9000
networks:
- pernstore
# depends_on:
# - database
client:
image: pern-store-client
container_name: pern-store-client
restart: unless-stopped
env_file:
- ./client/.env
build:
context: ./client
dockerfile: Dockerfile
ports:
- 3001:3000
volumes:
- ./client:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- server
networks:
- pernstore
# database:
# container_name: pern-store-db
# image: postgres
# restart: always
# env_file:
# - ./server/.env
# environment:
# # other environment variables is in ./server/.env file
# - POSTGRES_PASSWORD=adminuser
# ports:
# - 7890:5432
# volumes:
# - ./db:/var/lib/postgresql/data
# # When the PostgreSQL container is started it will run any scripts
# # provided in the `docker-entrypoint-initdb.d` directory
# # seed the database with the init.sql file
# - ./server/config/init.sql:/docker-entrypoint-initdb.d/init.sql
# pgadmin:
# image: dpage/pgadmin4
# environment:
# PGADMIN_DEFAULT_EMAIL: "[email protected]"
# PGADMIN_DEFAULT_PASSWORD: "qwertyuiop"
# ports:
# - "16543:80"
# depends_on:
# - database
networks:
pernstore:
driver: bridge
volumes:
db:
driver: local