forked from UniCourt/Search-Workshop1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·35 lines (32 loc) · 944 Bytes
/
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
version: '3.7'
# database is one service that we have in this docker-compose
services:
database:
container_name: ws1_db
# For this service we are postgres:14-alpine image, it is nothing but a docker image. These images we can get it from dockerhub
image: postgres:14.1-alpine
# Below we are setting the environment by setting username,password,db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# volumes from our system at target paths inside the container
volumes:
- db:/var/lib/postgresql/data
- ./docs/docker/student.sql:/sql_file/student.sql
# maps the external port 5432 to internal port 5432
ports:
- "5435:5432"
# command: sh /src/script/script_run.sh
script:
container_name: ws1_script
build:
context: .
dockerfile: ./src/script/Dockerfile
volumes:
- ./src/script:/script
command: sh script_run.sh
ports:
- "8000:8000"
volumes:
db:
driver: local