-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (35 loc) · 795 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (35 loc) · 795 Bytes
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
version: "3.9"
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
networks:
- backend
depends_on:
- db
tty: true
environment:
GO_ENV: docker
command: sh -c '/app/scripts/wait-for db:5432 -- /app/timetrack'
db:
image: postgres:14-alpine
environment:
- POSTGRES_DB=timetracker
- POSTGRES_USER=timetraveler
- POSTGRES_PASSWORD=timetraveler_changeme
ports:
- '5432:5432'
volumes:
- ./database/schema-1.sql:/docker-entrypoint-initdb.d/1-schema.sql
- ./database/example-data.sql:/docker-entrypoint-initdb.d/2-data.sql
- data:/var/lib/postgresql/data
networks:
- backend
volumes:
data:
networks:
backend:
driver: bridge