-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
87 lines (87 loc) · 2.24 KB
/
docker-compose.dev.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
services:
reverse-proxy:
image: traefik:v2.10
command: --api.insecure=true --providers.docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "8080:8080"
admin-app:
image: yigitsadic/birthday_admin_app
build:
context: admin_app
dockerfile: build/Dockerfile
volumes:
- ./admin_app:/src
environment:
- "RAILS_ENV=development"
- "ADMIN_USER_NAME=$ADMIN_USER_NAME"
- "ADMIN_PASSWORD=$ADMIN_PASSWORD"
ports:
- "4422:3000"
depends_on:
- database
labels:
- "traefik.http.routers.admin_app.rule=Host(`admin.cakeday.localhost`)"
api:
image: yigitsadic/birthday_api
build:
context: api
dockerfile: build/Dockerfile
environment:
- "POSTGRES_DSL=postgres://$DBNAME:$DBPASS@database:5432/$DBNAME?sslmode=disable"
- "PORT=9988"
- "WEB_APP_URL=http://app.cakeday.localhost"
ports:
- "3595:9988"
depends_on:
- database
labels:
- "traefik.http.routers.api.rule=Host(`api.cakeday.localhost`)"
web-app:
image: yigitsadic/birthday_web_app
build:
context: app
dockerfile: build/Dockerfile
args:
- API_URL=http://api.cakeday.localhost
ports:
- "3570:80"
labels:
- "traefik.http.routers.app.rule=Host(`app.cakeday.localhost`)"
static-site:
build:
context: static-site
dockerfile: build/Dockerfile
environment:
- "WEBAPP_URL=app.cakeday.localhost"
ports:
- "3555:3000"
labels:
- "traefik.http.routers.static_site.rule=Host(`cakeday.localhost`)"
database:
image: postgres:15.2-alpine
restart: always
environment:
- POSTGRES_USER=$DBNAME
- POSTGRES_PASSWORD=$DBPASS
ports:
- "$DBPORT:5432"
volumes:
- db_volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-h", "localhost", "-p", "5432"]
interval: 5s
timeout: 3s
retries: 10
db-migrate:
image: yigitsadic/birthday_db_migrations
environment:
- "POSTGRES_DSL=postgres://$DBNAME:$DBPASS@database:5432/$DBNAME?sslmode=disable"
depends_on:
- database
profiles: ["db-operations"]
volumes:
db_volume:
driver: local