0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00

Updated .devcontainer dockers

This commit is contained in:
Ronald Langeveld 2024-10-10 17:27:46 +01:00
parent f1f0e9c15f
commit 213ba0b59e
4 changed files with 69 additions and 27 deletions

11
.devcontainer/Dockerfile Normal file
View file

@ -0,0 +1,11 @@
ARG NODE_VERSION=20.15.1
FROM node:$NODE_VERSION-bullseye
WORKDIR /home/ghost
ENV NX_DAEMON=true
ENV NX_REJECT_UNKNOWN_LOCAL_CACHE=0
EXPOSE 2368
EXPOSE 4200

View file

@ -1,37 +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/docker-existing-docker-compose
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Docker Compose (Extend)",
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],
// The 'service' property is the name of the service for the container that VS Code should
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
"service": "ghost",
// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}"
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"name": "Docker",
"build": {
"dockerfile": "./Dockerfile"
},
// "features": {
// "ghcr.io/devcontainers/features/node:1": {
// "nodeGypDependencies": true,
// "installYarnUsingApt": true
// }
// }
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
// "forwardPorts": []
// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",
"postCreateCommand": "yarn install && git submodule update --init && NODE_ENV=development"
// Configure tool-specific properties.
// "customizations": {},

View file

@ -0,0 +1,42 @@
services:
ghost:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/home/ghost
restart: always
ports:
- 2368:2368
- 4200:4200
environment:
- NODE_ENV=dockerdev
- DEBUG=${DEBUG}
- APP_FLAGS=${APP_FLAGS}
tty: true
mysql:
image: mysql:8.0.35
container_name: ghost-full-mysql
# We'll need to look into how we can further fine tune the memory usage/performance here
command: --innodb-buffer-pool-size=1G --innodb-log-buffer-size=500M --innodb-change-buffer-max-size=50 --innodb-flush-log-at-trx_commit=0 --innodb-flush-method=O_DIRECT
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ghost
restart: always
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: "mysql -uroot -proot ghost -e 'select 1'"
interval: 1s
retries: 120
redis:
image: redis:7.0
container_name: ghost-full-redis
ports:
- "6379:6379"
restart: always
volumes:
mysql-data:

4
.gitmodules vendored
View file

@ -1,8 +1,8 @@
[submodule "ghost/core/content/themes/casper"]
path = ghost/core/content/themes/casper
url = ../../TryGhost/Casper.git
url = https://github.com/TryGhost/Casper.git
ignore = all
[submodule "ghost/core/content/themes/source"]
path = ghost/core/content/themes/source
url = ../../TryGhost/Source.git
url = https://github.com/TryGhost/Source.git
ignore = all