Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/devcontainers/go:2-1.25-trixie

RUN go install github.com/pressly/goose/v3/cmd/goose@latest
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
RUN go install go install github.com/hieunguyent12/swag/v2/cmd/swag@bcae90f384b937c1c47dbe9b5d8e7ba8cbe96aac
25 changes: 25 additions & 0 deletions .devcontainer/api/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "api-devcontainer",
"dockerComposeFile": ["../../docker-compose.yml"],
"service": "api-devcontainer",
"shutdownAction": "none",
"workspaceFolder": "/core/apps/api",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},


// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
3 changes: 3 additions & 0 deletions .devcontainer/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie

RUN npm install -g pnpm
26 changes: 26 additions & 0 deletions .devcontainer/web/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "web-devcontainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie",
"dockerComposeFile": ["../../docker-compose.yml"],
"service": "web-devcontainer",
"shutdownAction": "none",
"workspaceFolder": "/core/apps/web",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm i",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
8 changes: 8 additions & 0 deletions apps/api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ migrate-up:
migrate-down:
@goose -dir ./internal/db/migrations postgres ${DATABASE_URL_MIGRATION} down

# Use this command when developing inside a dev container.
# 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
migrate-up-devcontainer:
@goose -dir ./internal/db/migrations postgres ${DATABASE_URL} up

migrate-down-devcontainer:
@goose -dir ./internal/db/migrations postgres ${DATABASE_URL} down

generate:
@sqlc generate

Expand Down
Loading
Loading