-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (94 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: "3.7"
services:
backend:
build: &be-build
context: backend
target: base
volumes: &be-volumes
- ./backend/src:/app/src
- ./backend/templates:/app/templates
- ./backend/public:/app/public
- ./backend/seeds:/app/seeds
- ./backend/migrations:/app/migrations
- ./backend/nodemon.json:/app/nodemon.json
ports:
- "8080:8080"
environment: &be-environment
- PORT=8080
- APP_VERSION=development
- DASHBOARD_USERNAME=admin
- DASHBOARD_PASSWORD=admin
# interface w/ postgres
- DATABASE_URL=postgres://db_user:db_pass@postgres/db_name
# interface w/ minio
- STORAGE_ACCESS_KEY=minioadmin
- STORAGE_SECRET_KEY=minioadmin
- STORAGE_ENDPOINT=minio
- STORAGE_PORT=9000
- STORAGE_BUCKET=words
command: npm run serve
depends_on:
- postgres
- minio
cli: # USAGE: docker-compose run --rm cli
profiles: ["cli"]
stdin_open: true # docker run -i
tty: true # docker run -t
build: *be-build
volumes: *be-volumes
environment: *be-environment
command: /bin/sh
postgres:
image: postgres:14-alpine
restart: always
environment:
- POSTGRES_DB=db_name
- POSTGRES_USER=db_user
- POSTGRES_PASSWORD=db_pass
- PGDATA=/var/lib/postgresql/data/pgdata
expose:
- "5432"
ports:
- "5432:5432"
volumes:
# - postgres_data:/var/lib/postgresql/data
- ./postgres_data:/var/lib/postgresql/data
minio:
image: minio/minio:latest
restart: always
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
# - MINIO_BROWSER_REDIRECT_URL=
expose:
- "9000"
- "9001"
ports:
- "9000:9000"
- "9001:9001"
volumes:
# - minio_data:/data
- ./minio_data:/data
entrypoint: minio server /data --console-address ":9001"
frontend:
image: node:16-alpine
volumes:
- ./frontend:/app
working_dir: /app
ports:
- "1234:1234"
environment:
- BACKEND_URL=http://localhost:8080
- STORAGE_URL=http://localhost:9000/words/
- APP_VERSION=development
entrypoint: ["/bin/sh", "-c"]
command:
- |
npm install
npm run serve
depends_on:
- backend
- minio
# volumes:
# postgres_data:
# minio_data: