Projekt

Obecné

Profil

Stáhnout (1.26 KB) Statistiky
| Větev: | Tag: | Revize:
1 f3e8b06e Jakub Smid
version: '3.8'
2
3
services:
4
  db: # PostgreSQL database
5
    image: postgres:14.2
6
    container_name: postgres-db
7
    environment:
8 6a1a8cd7 Jakub Smid
      - POSTGRES_DB=backend-db                # database name
9
      - POSTGRES_USER=backend-db              # database user
10
      - POSTGRES_PASSWORD=gLt7*6d@pL!kAC8A8j8w  # database password
11 f3e8b06e Jakub Smid
    expose:
12
      - 5432
13
    ports:
14
      - "5432:5432"                # expose port 5432 (PostgreSQL) out of the docker container to the local machine
15 0319d5a2 Jakub Smid
    volumes:
16 6a1a8cd7 Jakub Smid
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
17
      - db-data:/var/lib/postgresql/dat
18 f3e8b06e Jakub Smid
19
20 6a1a8cd7 Jakub Smid
#  app: # Spring boot application
21
#    build: .
22
#    container_name: app-backend  # name of the container
23
#    image: schwobik/backend-app:1.5
24
#    ports:
25
#      - "8080:8080"                 # expose port 8080 out of the docker container do the local machine
26
#    depends_on:
27
#      - db
28
#    environment:
29
#      - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/test # overwrites application.properties datasource url to connect to the database
30
#
31
#  frontend:
32 b539ef29 Jakub Smid
#     Since our Dockerfile for web-server is located in react-app folder, our build context is ./react-app
33 6a1a8cd7 Jakub Smid
#    build: ../frontend
34
#    container_name: frontend
35
#    image: schwobik/frontend-app:1.5
36
#    ports:
37
#      - "80:80"
38 0319d5a2 Jakub Smid
39 f3e8b06e Jakub Smid
volumes:
40
  db-data: