-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (51 loc) · 1.02 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
version: "3.9"
services:
base:
image: ${IMAGE_NAME}:base-${BASE_VERSION}
build:
context: .
target: base
args:
BUILDKIT_INLINE_CACHE: 1
IMAGE_NAME: ${IMAGE_NAME}
cache_from:
- ${IMAGE_NAME}:base-${BASE_VERSION}
web-dev:
tty: true
stdin_open: true
env_file:
- .env
build:
context: .
target: dev
args:
BASE_VERSION: ${BASE_VERSION}
IMAGE_NAME: ${IMAGE_NAME}
command: bin/dev
depends_on:
- postgres
ports:
- "3000:3000"
volumes:
- .:/app
- gems:/usr/local/bundle
- node_modules:/app/node_modules
user: ${UID}
web:
build:
context: .
target: web
args:
BASE_VERSION: ${BASE_VERSION}
IMAGE_NAME: ${IMAGE_NAME}
postgres:
image: postgres:alpine3.14
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: "trust"
volumes:
db_data:
gems:
node_modules: