forked from teracyhq/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (75 loc) · 2.44 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
version: "3"
services:
dev:
container_name: teracy-blog_dev
build:
context: .
dockerfile: Dockerfile-dev
args:
CI_BUILD_ID: ${CI_BUILD_ID}
CI_BUILD_REF: ${CI_BUILD_REF}
CI_BUILD_REF_NAME: ${CI_BUILD_REF_NAME}
CI_BUILD_TIME: ${CI_BUILD_TIME}
CI_REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
CI_PROJECT_NAME: ${CI_PROJECT_NAME}
CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}
CI_BUILDER: ${CI_BUILDER}
image: ${DOCKER_IMAGE_DEV:-teracy/blog:dev_latest}
environment:
- VIRTUAL_HOST=dev.blog.teracy.dev
# TODO(hoatle): need to remove this to support https by default
- HTTPS_METHOD=noredirect
command: bash -c "rake generate && rake preview"
ports:
- 4000
volumes:
- .:/opt/app
# to get this work with https://github.com/jwilder/nginx-proxy
# related: https://github.com/jwilder/nginx-proxy/issues/305
network_mode: bridge
prod:
container_name: teracy-blog_prod
build:
context: .
dockerfile: Dockerfile
args:
CI_BUILD_ID: ${CI_BUILD_ID}
CI_BUILD_REF: ${CI_BUILD_REF}
CI_BUILD_REF_NAME: ${CI_BUILD_REF_NAME}
CI_BUILD_TIME: ${CI_BUILD_TIME}
CI_REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
CI_PROJECT_NAME: ${CI_PROJECT_NAME}
CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}
CI_BUILDER: ${CI_BUILDER}
image: ${DOCKER_IMAGE_PROD:-teracy/blog:latest}
environment:
- VIRTUAL_HOST=blog.teracy.dev
- HTTPS_METHOD=noredirect
ports:
- 80
# to get this work with https://github.com/jwilder/nginx-proxy
# related: https://github.com/jwilder/nginx-proxy/issues/305
network_mode: bridge
review:
container_name: teracy-blog_review
build:
context: .
dockerfile: Dockerfile
args:
CI_BUILD_ID: ${CI_BUILD_ID}
CI_BUILD_REF: ${CI_BUILD_REF}
CI_BUILD_REF_NAME: ${CI_BUILD_REF_NAME}
CI_BUILD_TIME: ${CI_BUILD_TIME}
CI_REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
CI_PROJECT_NAME: ${CI_PROJECT_NAME}
CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}
CI_BUILDER: ${CI_BUILDER}
image: ${DOCKER_IMAGE_REVIEW:-teracy/blog:latest}
environment:
- VIRTUAL_HOST=review.blog.teracy.dev
- HTTPS_METHOD=noredirect
ports:
- 80
# to get this work with https://github.com/jwilder/nginx-proxy
# related: https://github.com/jwilder/nginx-proxy/issues/305
network_mode: bridge