forked from Weitzman-MUSA-GeoCloud/assignment02
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
55 lines (53 loc) · 1.38 KB
/
Copy pathcompose.yml
File metadata and controls
55 lines (53 loc) · 1.38 KB
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
# Create a postgis service using the postgis/postgis image.
services:
db:
# Database image pre-loaded with initial table structure
image: ghcr.io/weitzman-musa-geocloud/assignment02:main
environment:
POSTGRES_PASSWORD: postgres
healthcheck:
test: [
"CMD-SHELL",
'psql -U postgres -d postgres -c "SELECT ST_Buffer( ST_SetSRID(''POINT(0 0)''::GEOMETRY, 4326), 1) AS geom ;"',
]
interval: 5s
timeout: 5s
retries: 5
run-linter:
image: ubuntu:24.04
volumes:
- .:/assignment02
command:
- "bash"
- "-c"
- |
apt-get update && \
apt-get install -y python3 python3-pip python3-venv && \
cd /tmp && \
python3 -m venv venv && \
source venv/bin/activate && \
cd /assignment02 && \
pip install -r requirements.txt && \
sqlfluff lint .
run-tests:
image: ubuntu:24.04
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_USER: postgres
POSTGRES_PASS: postgres
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_NAME: assn02
volumes:
- .:/assignment02
command:
- "bash"
- "-c"
- |
apt update && \
apt install -y nodejs npm && \
cd /assignment02 && \
npm install --global && \
npm run test -- --rootDir /assignment02