-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.2 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
version: "3"
# хранилища
volumes:
pgdata:
driver: local
services:
nginx:
hostname: nginx
restart: always
image: nginx:latest
expose:
- 8080
ports:
- "80:8080"
volumes:
- ./server/logs:/srv/www/src/logs
- ./nginx:/etc/nginx/conf.d
depends_on:
- client
- server
server:
# hard start: docker-compose up --no-deps --force-recreate --build server
restart: always
build:
context: ./server
dockerfile: Dockerfile
volumes:
- ./server:/srv/www/src
expose:
- 3000
ports:
- 3000:3000
command: "cabal run"
client:
hostname: frontend
build:
context: ./client
dockerfile: Dockerfile
restart: always
expose:
- 8000
ports:
- 8000:8000
volumes:
- ./client:/srv/www/src
- /srv/www/src/node_modules
- /srv/www/src/dist
command: "npm run server"
postgres:
image: postgres:9.3.22
ports:
- 5432:5432
environment:
POSTGRES_USER: username
POSTGRES_PASSWORD: postgresql_password
POSTGRES_DB: database_name
PGDATA: /var/lib/postgresql/data
volumes:
- pgdata:/var/lib/postgresql/data