This commit is contained in:
5
.devcontainer/Dockerfile
Normal file
5
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM node:22
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
USER node
|
18
.devcontainer/devcontainer.json
Normal file
18
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "website",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
"forwardPorts": ["3306:3306", "4321:4321"],
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "22"
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "npm install",
|
||||
"customizations": {
|
||||
"jetbrains": {
|
||||
"plugins": ["org.jetbrains.plugins.astro", "dev.blachut.svelte.lang"]
|
||||
}
|
||||
}
|
||||
}
|
23
.devcontainer/docker-compose.yml
Normal file
23
.devcontainer/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
command: sleep infinity
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
DATABASE_URL: mysql://website:website@db:3306/website
|
||||
ports:
|
||||
- '4321:4321'
|
||||
|
||||
db:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MARIADB_ROOT_PASSWORD: root
|
||||
MARIADB_DATABASE: website
|
||||
MARIADB_USER: website
|
||||
MARIADB_PASSWORD: website
|
||||
ports:
|
||||
- '3306:3306'
|
||||
restart: always
|
Reference in New Issue
Block a user