Skip to content

Commit

Permalink
format and add OVERRIDE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
NexVeridian committed Jun 3, 2024
1 parent 3965a31 commit 13b89e5
Show file tree
Hide file tree
Showing 37 changed files with 530 additions and 496 deletions.
97 changes: 47 additions & 50 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,50 @@
// 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": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/typescript-node:0-20",
"build": {
// Path is relataive to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
// https://github.com/microsoft/vscode-remote-release/issues/2485#issuecomment-1156342780
"runArgs": [
"--name",
"devcontainer-${containerWorkspaceFolderBasename}"
],
"initializeCommand": "docker rm -f devcontainer-${containerWorkspaceFolderBasename} || true",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/nix: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",
"postAttachCommand": {
"AddGitSafeDir": "git config --global --add safe.directory /workspaces/${containerWorkspaceFolderBasename}"
},
"onCreateCommand": {
"nix-shell": "nix-shell --command 'echo done install packages'"
},
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"mutantdino.resourcemonitor",
"christian-kohler.path-intellisense",
"Gruntfuggly.todo-tree",
"ms-azuretools.vscode-docker",
"redhat.vscode-yaml",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"GitHub.copilot",
"GitHub.copilot-chat"
]
}
}
}
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/typescript-node:0-20",
"build": {
// Path is relataive to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
// https://github.com/microsoft/vscode-remote-release/issues/2485#issuecomment-1156342780
"runArgs": ["--name", "devcontainer-${containerWorkspaceFolderBasename}"],
"initializeCommand": "docker rm -f devcontainer-${containerWorkspaceFolderBasename} || true",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/nix: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",
"postAttachCommand": {
"AddGitSafeDir": "git config --global --add safe.directory /workspaces/${containerWorkspaceFolderBasename}"
},
"onCreateCommand": {
"nix-shell": "nix-shell --command 'echo done install packages'"
},
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"mutantdino.resourcemonitor",
"christian-kohler.path-intellisense",
"Gruntfuggly.todo-tree",
"ms-azuretools.vscode-docker",
"redhat.vscode-yaml",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"GitHub.copilot",
"GitHub.copilot-chat"
]
}
}
}
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Install docker, vscode and the [Dev Containers Extension](https://marketplace.vi

`npx npm-check-updates -u`

make sure to run `npx prettier . --write` before committing

# License
All code in this repository is dual-licensed under either [License-MIT](./LICENSE-MIT) or [LICENSE-APACHE](./LICENSE-Apache) at your option. This means you can select the license you prefer. [Why dual license](https://github.com/bevyengine/bevy/issues/2373)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ POSTGRES_DB=url
# surrealdb
DB_USER=root
DB_PASSWORD=root
OVERRIDE_URL=s.nexv.dev
```

# License
Expand Down
2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"components": "@/components",
"utils": "@/lib/utils"
}
}
}
58 changes: 29 additions & 29 deletions docker-compose-postgres.dev.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
version: "3"
services:
next-url-shortener:
container_name: next-url-shortener
build: .
env_file:
- .env
ports:
- 3000:3000
depends_on:
- postgres
networks:
- postgres
next-url-shortener:
container_name: next-url-shortener
build: .
env_file:
- .env
ports:
- 3000:3000
depends_on:
- postgres
networks:
- postgres

postgres:
container_name: postgres
image: postgres:latest
env_file:
- .env
restart: always
deploy:
resources:
reservations:
cpus: 1
ports:
- 5432:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- postgres
postgres:
container_name: postgres
image: postgres:latest
env_file:
- .env
restart: always
deploy:
resources:
reservations:
cpus: 1
ports:
- 5432:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- postgres

volumes:
data:
data:

networks:
postgres:
postgres:
58 changes: 29 additions & 29 deletions docker-compose-postgres.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
version: "3"
services:
next-url-shortener:
container_name: next-url-shortener
image: ghcr.io/nexveridian/next-url-shortener:latest
env_file:
- .env
ports:
- 3000:3000
depends_on:
- postgres
networks:
- postgres
next-url-shortener:
container_name: next-url-shortener
image: ghcr.io/nexveridian/next-url-shortener:latest
env_file:
- .env
ports:
- 3000:3000
depends_on:
- postgres
networks:
- postgres

postgres:
container_name: postgres
image: postgres:latest
env_file:
- .env
restart: always
deploy:
resources:
reservations:
cpus: 1
ports:
- 5432:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- postgres
postgres:
container_name: postgres
image: postgres:latest
env_file:
- .env
restart: always
deploy:
resources:
reservations:
cpus: 1
ports:
- 5432:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
- postgres

volumes:
data:
data:

networks:
postgres:
postgres:
72 changes: 36 additions & 36 deletions docker-compose-surrealdb.dev.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
version: "3"
services:
nextjs:
build: .
env_file:
- .env
ports:
- "3000:3000"
depends_on:
- surrealdb
networks:
- surrealdb
nextjs:
build: .
env_file:
- .env
ports:
- "3000:3000"
depends_on:
- surrealdb
networks:
- surrealdb

surrealdb:
container_name: surrealdb
image: surrealdb/surrealdb:latest-dev
env_file:
- .env
entrypoint:
- /surreal
- start
- --user
- $DB_USER
- --pass
- $DB_PASSWORD
- file:/data/surrealdb
restart: always
deploy:
resources:
reservations:
cpus: "1"
ports:
- 8000:8000
volumes:
- ./data:/data
networks:
- surrealdb
surrealdb:
container_name: surrealdb
image: surrealdb/surrealdb:latest-dev
env_file:
- .env
entrypoint:
- /surreal
- start
- --user
- $DB_USER
- --pass
- $DB_PASSWORD
- file:/data/surrealdb
restart: always
deploy:
resources:
reservations:
cpus: "1"
ports:
- 8000:8000
volumes:
- ./data:/data
networks:
- surrealdb

volumes:
data:
data:

networks:
surrealdb:
surrealdb:
Loading

0 comments on commit 13b89e5

Please sign in to comment.