-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (43 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
47 lines (43 loc) · 1.25 KB
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
version: '3.8'
services:
# Single-stage build (baseline)
shiny-single:
build:
context: .
dockerfile: Dockerfile.single-stage
image: shiny-app:single
container_name: shiny-single-stage
ports:
- "3838:3838"
restart: unless-stopped
profiles:
- single
# Two-stage build (optimized)
shiny-two-stage:
build:
context: .
dockerfile: Dockerfile.multistage
image: shiny-app:two-stage
container_name: shiny-two-stage
ports:
- "3838:3838"
restart: unless-stopped
profiles:
- two-stage
# Three-stage build (advanced optimization)
shiny-three-stage:
build:
context: .
dockerfile: Dockerfile.three-stage
image: shiny-app:three-stage
container_name: shiny-three-stage
ports:
- "3838:3838"
restart: unless-stopped
# This is the default service to run
# Usage:
# docker-compose up # Runs three-stage version (default)
# docker-compose up shiny-single # Runs single-stage version
# docker-compose up shiny-two-stage # Runs two-stage version
# docker-compose up shiny-three-stage # Runs three-stage version (explicit)
# docker-compose down # Stop and remove containers