-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
63 lines (61 loc) · 1.15 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
x-web: &web
container_name: portfolio
restart: always
tty: true
stdin_open: true
env_file:
- .env
ports:
- "${WEB_PORT}:${WEB_PORT}"
services:
redis:
container_name: portfolio-redis
image: bitnami/redis:latest
restart: always
tty: true
stdin_open: true
user: root
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
environment:
REDIS_PORT_NUMBER: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
volumes:
- ./.docker/redis:/bitnami/redis
profiles:
- dev
- ''
web-dev:
<<: *web
user: root
build:
context: .
target: development
dockerfile: Dockerfile
volumes:
- .:/usr/src/app
depends_on:
redis:
condition: service_healthy
profiles:
- dev
- ''
web-prod:
<<: *web
image: izakdvlpr/izakdvlpr.com:latest
network_mode: host
build:
context: .
target: production
dockerfile: Dockerfile
profiles:
- prod
networks:
default:
name: portfolio
driver: bridge