-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 1021 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 1021 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
40
41
services:
web:
container_name: fuck45-web
build:
context: .
dockerfile: ./Dockerfile
hostname: fuck45
platform: linux/arm64/v8 # linux/amd64 / linux/arm64/v8
tty: false # false for `entrypoint` in Dockerfile
stdin_open: false # false for `entrypoint` in Dockerfile
ports:
- "8000:8000/tcp"
volumes:
- .:/app
working_dir: /app
depends_on:
db:
condition: service_healthy
# TODO: don't hardcode creds
db:
image: postgres:latest
container_name: fuck45-db
hostname: db
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=supersecurepassword
ports:
- "5432:5432/tcp"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./bin/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d postgres"]
interval: 5s
timeout: 5s
retries: 3
volumes:
postgres_data: