-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcompose.yaml
42 lines (40 loc) · 1.04 KB
/
compose.yaml
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
version: "3.8"
services:
builder:
container_name: builder
# Build frontend service using Dockerfile.build
build:
context: .
dockerfile: ./docker/Dockerfile.build
args:
NODE_VERSION: 20.15.1
ALPINE_VERSION: 3.14
# Mount built app to /usr/src in the container
volumes:
- build:/usr/src/
nginx:
container_name: nginx-proxy
# Build the nginx service using Dockerfile.stage
build:
context: .
dockerfile: ./docker/Dockerfile.stage
args:
NGINX_VERSION: 1.19.6
PROXY_API_URL: ${PROXY_API_URL:-http://localhost:8080}
password: ${password}
# Expose ports 80 and 2222 from the container
ports:
- '80:80'
- '2222:2222'
# Enable tty and stdin for the container
stdin_open: true
tty: true
# Mount the build volume to /usr/share/nginx/html in the container
volumes:
- build:/usr/share/nginx/html
# Specify dependencies between services
depends_on:
- builder
# Define build volume
volumes:
build: