-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
65 lines (63 loc) · 1.6 KB
/
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
name: bounswe2024group1-451
# Production-like docker-compose setup
services:
s3mock:
profiles:
- s3
image: adobe/s3mock:latest
environment:
- retainFilesOnExit=true
- initialBuckets=programmingforum
- root=containers3root
ports:
- 9090:9090
- 9191:9191
volumes:
- s3mock-files:/containers3root
swagger:
image: swaggerapi/swagger-ui
environment:
SWAGGER_JSON: /openapi.yaml
volumes:
- ./swagger/openapi.yml:/openapi.yaml
ports:
- "8081:8080"
db:
image: mysql:latest
environment:
MYSQL_DATABASE: "programmingforum-test"
MYSQL_ROOT_PASSWORD: "admin"
volumes:
- db-data:/var/lib/mysql
backend:
build: ./backend
platform: linux/amd64
ports:
- "8080:8080"
environment:
DB_HOST: db:3306
DB_NAME: programmingforum-test
DB_USER: root
DB_PASSWORD: admin
SPRING_PROFILES_ACTIVE: docker
DO_SPACES_ENDPOINT: "http://s3mock:9090"
DO_SPACES_ACCESS_KEY: "---"
DO_SPACES_SECRET_KEY: "---"
DO_SPACES_BUCKET: "programmingforum"
depends_on:
- db
web:
build: ./frontend
platform: linux/amd64
volumes:
# these binds are required to reverse proxy the backend through nginx
# in prod, this is configured through digitalocean
- ./frontend/nginx/nginx-docker-compose.conf:/etc/nginx/conf.d/default.conf
- ./frontend/nginx/template-vars.conf:/etc/nginx/templates/10-variables.conf.template
environment:
- PROXY_API=http://backend:8080
ports:
- "80:80"
volumes:
db-data:
s3mock-files: