generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
55 lines (51 loc) · 1.79 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
version: "3.8"
services:
database:
container_name: "amos-linter-postgres-db"
image: "postgres:alpine"
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgres-data:/var/lib/postgresql/data
expose:
- 5432
backend:
container_name: "amos-linter-java-server"
image: "amoslinter/server:${ENVIRONMENT}"
environment:
- spring.datasource.platform=postgres
- spring.datasource.url=jdbc:postgresql://database:5432/${DB_NAME}
- spring.datasource.username=${DB_USER}
- spring.datasource.password=${DB_PASSWORD}
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
- GITLAB_ACCESS_TOKEN=${GITLAB_ACCESS_TOKEN}
- server.port=8080
- CONFIG_FILE=/home/amos/config.json
volumes: # more like: load nginx configuration
- ./config.json:/home/amos/config.json
depends_on:
- database
expose:
- 8080
nginx:
container_name: "amos-linter-nginx"
image: "amoslinter/frontend:${ENVIRONMENT}"
volumes: # more like: load nginx configuration
- ${NGINX_CONFIG}:/etc/nginx/templates/default.conf.template
- ${SSL_CERTIFICATE:-/dev/null}:/ssl/fullchain.pem
- ${SSL_CERTIFICATE_KEY:-/dev/null}:/ssl/privkey.pem
environment:
- HOST=${HOST:-localhost}
depends_on:
- backend
ports: # only connection to outside world
- 6969:80
- 80:80
- 443:443
links:
- backend
volumes:
postgres-data: