File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/devcontainers/go:2-1.25-trixie
2+
3+ RUN apt-get update && apt-get install -y postgresql-common \
4+ && yes | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh \
5+ && apt-get install -y postgresql-client-18 \
6+ && rm -rf /var/lib/apt/lists/*
7+
8+ USER vscode
9+ RUN go install golang.org/x/tools/cmd/goimports@latest
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " pgx" ,
3+ "dockerComposeFile" : " docker-compose.yml" ,
4+ "service" : " app" ,
5+ "workspaceFolder" : " /workspaces/${localWorkspaceFolderBasename}"
6+ }
Original file line number Diff line number Diff line change 1+ version : ' 3.8'
2+
3+ volumes :
4+ postgres-18-data :
5+
6+ services :
7+ app :
8+ build :
9+ context : .
10+ dockerfile : Dockerfile
11+
12+ volumes :
13+ - ../..:/workspaces:cached
14+
15+ environment :
16+ PGUSER : postgres
17+ PGPASSWORD : postgres
18+ PGDATABASE : pgx_test
19+ PGHOST : localhost
20+
21+ # Overrides default command so things don't shut down after the process ends.
22+ command : sleep infinity
23+
24+ postgres-18 :
25+ image : postgres:18
26+ restart : unless-stopped
27+ volumes :
28+ - postgres-18-data:/var/lib/postgresql
29+ - ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
30+ network_mode : service:app
31+ environment :
32+ POSTGRES_USER : postgres
33+ POSTGRES_PASSWORD : postgres
34+ POSTGRES_DB : pgx_test
35+ POSTGRES_HOSTNAME : localhost
You can’t perform that action at this time.
0 commit comments