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
1+ FROM mcr.microsoft.com/devcontainers/go:2-1.25-trixie
2+
3+ RUN go install github.com/pressly/goose/v3/cmd/goose@latest
4+ RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
Original file line number Diff line number Diff line change 22// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
33{
44 "name" : " api-devcontainer" ,
5- "dockerComposeFile" : [" ../docker-compose.yml" ],
5+ "dockerComposeFile" : [" ../../ docker-compose.yml" ],
66 "service" : " api-devcontainer" ,
77 "shutdownAction" : " none" ,
88 "workspaceFolder" : " /core/apps/api" ,
99 "features" : {
1010 "ghcr.io/devcontainers/features/git:1" : {}
11- }
11+ },
1212
1313
1414 // Use 'forwardPorts' to make a list of ports inside the container available locally.
2121 // "customizations": {},
2222
2323 // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24- // "remoteUser": "root"
24+ "remoteUser" : " root"
2525}
Load diff This file was deleted.
Original file line number Diff line number Diff line change 44 "name" : " web-devcontainer" ,
55 // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66 // "image": "mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie",
7- "dockerComposeFile" : [" ../docker-compose.yml" ],
7+ "dockerComposeFile" : [" ../../ docker-compose.yml" ],
88 "service" : " web-devcontainer" ,
99 "shutdownAction" : " none" ,
1010 "workspaceFolder" : " /core/apps/web" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ migrate-up:
66migrate-down :
77 @goose -dir ./internal/db/migrations postgres ${DATABASE_URL_MIGRATION} down
88
9+ # Use this command when developing inside a dev container.
10+ # Maybe we could figure out a way to connect directly to the host's localhost, instead of using docker network to connect to the postgres db
11+ migrate-up-devcontainer :
12+ @goose -dir ./internal/db/migrations postgres ${DATABASE_URL} up
13+
14+ migrate-down-devcontainer :
15+ @goose -dir ./internal/db/migrations postgres ${DATABASE_URL} down
16+
917generate :
1018 @sqlc generate
1119
Original file line number Diff line number Diff line change @@ -87,6 +87,22 @@ services:
8787 retries : 5
8888 start_period : 5s
8989
90+ web-devcontainer :
91+ build :
92+ context : ./.devcontainer/web
93+ dockerfile : Dockerfile
94+ volumes :
95+ - .:/core
96+ - /core/apps/web/node_modules
97+ command : sleep infinity
98+
99+ api-devcontainer :
100+ build :
101+ context : ./.devcontainer/api
102+ dockerfile : Dockerfile
103+ volumes :
104+ - .:/core
105+ command : sleep infinity
90106
91107volumes :
92108 postgres_data :
You can’t perform that action at this time.
0 commit comments