-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·94 lines (91 loc) · 2.47 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: resume
# extra notes at bottom
services:
jenkins:
build:
context: .
dockerfile: jenkins.Dockerfile
volumes:
- $PWD/jenkins_home:/var/jenkins_home
- $PWD:/app
ports:
- 8080:8080
deploy:
build:
context: .
dockerfile: deploy.Dockerfile
environment:
- AWS_PROFILE=${AWS_PROFILE:-default}
- AWS_REGION=${AWS_REGION:-us-east-1}
volumes:
- .:/deployment
- $HOME/.aws:/home/deployer/.aws:ro
working_dir: /deployment
aws:
image: amazon/aws-cli
# entrypoint: bash
# running this with the entrypoint: bash with the given
# volumes allows you to start at root within the container
# docker-compose run --rm aws
# environment:
# AWS_REGION: "us-east-1"
volumes: #local path : container's path
- $PWD:/app
- /Users/jonathannguyen/.aws/credentials:/root/.aws/credentials
- /Users/jonathannguyen/.aws/:/root/.aws/
working_dir: /app #if using bash entrypoint, you will start here once you run this aws service container
# to transfer files to s3:
# with entrypoint:
# docker-compose run --rm aws s3 cp --recursive /app/website s3://www.jdnguyen.tech
# without entrypoint:
# docker-compose run --rm --entrypoint aws aws s3 cp --recursive /app/website s3://jdnguyen.tech
terraform:
# entrypoint: /bin/sh
build:
dockerfile: terraform.Dockerfile
context: .
environment:
- AWS_PROFILE=${AWS_PROFILE:-default}
- AWS_REGION=${AWS_REGION:-us-east-1}
volumes:
- ./terraform:/workspace/terraform
- $HOME/.aws:/home/tfuser/.aws:ro
working_dir: /workspace/terraform/environments/${ENVIRONMENT:-staging}
selenium:
image: selenium/standalone-chrome
platform: linux/x86_64
ports:
- 4444:4444
- 5901:5900
website:
build:
context: .
ports:
- 80:80
integration-tests:
build:
dockerfile: rspec.dockerfile
context: .
environment:
SELENIUM_HOST: selenium
SELENIUM_PORT: 4444
WEBSITE_URL: www.jdnguyen.tech.s3-website-us-east-1.amazonaws.com
volumes:
- $PWD:/app
entrypoint: rspec
command:
- --pattern
- /app/spec/integration/*_spec.rb
unit-tests:
build:
dockerfile: rspec.dockerfile
context: .
environment:
SELENIUM_HOST: selenium
SELENIUM_PORT: 4444
volumes:
- $PWD:/app
entrypoint: rspec
command:
- --pattern
- /app/spec/unit/*_spec.rb