-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
75 lines (67 loc) · 2.18 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
x-volumes:
&default-volumes
# Define all volumes you would like to have real-time mounted into the docker containers
volumes:
- .:/app:delegated ### Local overrides to mount host filesystem. Automatically removed in CI and PROD.
x-environment:
&default-environment
# Route that should be used locally, if you are using pygmy, this route *must* end with .docker.amazee.io
LAGOON_ROUTE: &default-url http://${COMPOSE_PROJECT_NAME:-ruby-on-rails}.docker.amazee.io
# Uncomment if you like to have the system behave like in production
#LAGOON_ENVIRONMENT_TYPE: production
# Uncomment to enable xdebug and then restart via `docker-compose up -d`
#XDEBUG_ENABLE: "true"
x-user:
&default-user
# The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000`
user: '1000'
volumes:
db:
{}
services:
ruby:
image: &cli-image ${COMPOSE_PROJECT_NAME:-ruby-base}-cli
networks:
- amazeeio-network
- default
build:
context: .
dockerfile: ./lagoon/ruby.dockerfile
labels:
lagoon.type: basic
<< : *default-volumes
environment:
<< : *default-environment # loads the defined environment variables from the top
nginx:
build:
context: .
dockerfile: lagoon/nginx.dockerfile
args:
RUBY_IMAGE: *cli-image # Inject the name of the cli image
labels:
lagoon.type: nginx
<< : *default-volumes # loads the defined volumes from the top
ports:
- "8080"
depends_on:
- ruby
environment:
<< : *default-environment # loads the defined environment variables from the top
LAGOON_LOCALDEV_URL: ruby-on-rails.docker.amazee.io
networks:
- amazeeio-network
- default
postgres:
image: uselagoon/postgres-15:latest
labels:
lagoon.type: postgres
ports:
- "5432" # exposes the port 5432 with a random local port, find it with `docker compose port postgres 5432`
<< : *default-user # uses the defined user from top
environment:
<< : *default-environment
volumes:
- db:/var/lib/postgresql/data
networks:
amazeeio-network:
external: true