forked from Tietokilta/ilmomasiina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 2.35 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
60
61
62
63
64
65
66
67
version: "3.2"
# This compose file is for development use only – Do not use this in production!
# This compose file builds Ilmomasiina and serves it at http://localhost:3000.
# For easier development, it provides hot reloading by utilizing bind mounts.
# You will still need to rebuild if you update the project's dependencies.
# Env vars from the .env file (in repository root) will be used by docker-compose and passed to the containers.
# Remember to create your own .env file (see .env.example)!
# The database will use the DB_USER, DB_PASSWORD and DB_DATABASE provided by you.
services:
database:
image: postgres:latest
restart: always
environment:
- POSTGRES_PASSWORD=$DB_PASSWORD
- POSTGRES_USER=$DB_USER
- POSTGRES_DB=$DB_DATABASE
volumes:
- ./data:/var/lib/postgresql/data
ports:
- "5432:5432"
ilmomasiina-dev:
build:
context: .
dockerfile: "Dockerfile.dev"
command: "npm start"
restart: always
depends_on:
- database
environment:
- DB_DIALECT=postgres
- DB_HOST=database
- NODE_ENV=development
- HOST=0.0.0.0
volumes:
- type: bind
source: ./packages/ilmomasiina-models/src
target: /opt/ilmomasiina/packages/ilmomasiina-models/src
- type: bind
source: ./packages/ilmomasiina-frontend/public
target: /opt/ilmomasiina/packages/ilmomasiina-frontend/public
- type: bind
source: ./packages/ilmomasiina-frontend/src
target: /opt/ilmomasiina/packages/ilmomasiina-frontend/src
- type: bind
source: ./packages/ilmomasiina-frontend/vite.config.ts
target: /opt/ilmomasiina/packages/ilmomasiina-frontend/vite.config.ts
- type: bind
source: ./packages/ilmomasiina-frontend/index.html
target: /opt/ilmomasiina/packages/ilmomasiina-frontend/index.html
- type: bind
source: ./packages/ilmomasiina-components/src
target: /opt/ilmomasiina/packages/ilmomasiina-components/src
- type: bind
source: ./packages/ilmomasiina-backend/src
target: /opt/ilmomasiina/packages/ilmomasiina-backend/src
- type: bind
source: ./packages/ilmomasiina-backend/emails
target: /opt/ilmomasiina/packages/ilmomasiina-backend/emails
- type: bind
source: .env
target: /opt/ilmomasiina/.env
ports:
- "3000:3000"