|
|
||
|---|---|---|
| .github/workflows | ||
| .husky | ||
| .vscode | ||
| json | ||
| public | ||
| scripts | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| codegen-fix.js | ||
| Dockerfile | ||
| gql-codegen.yml | ||
| index.d.ts | ||
| next-env.d.ts | ||
| next-sitemap.js | ||
| next.config.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
Laconic
Repository for Laconic's website, hosted on internal infrastructure.
To update it; ensure you have access, ssh in, rebuild the docker image, and redeploy it using stack orchestrator.
Access
- ensure you have a user on
abernathy(ask Shane), - to your
~/.ssh/configadd
Host abernathy
Hostname abernathy.vdb.to
Port 12000
User zach
Host dugwaybeds.vdb.to
ProxyJump abernathy
then,
ssh user@dugwaybeds.vdb.to
Next, either deploy to staging or to production (see further below).
Local development
To build and serve this site on your local machine:
Install yarn
e.g,:
npm install -g yarn
Set env
export NEXT_PUBLIC_DATOCMS_BYPASS_TYPE="local_json"
Install the dependencies:
yarn
Serve
Run the development server
yarn dev
Staging
To run a temporary staging deployment,
- ensure none exists or remove it
- run
laconic-so --stack laconic-dot-com setup-repositories - navigate to
~/cerc/laconic.com - select the correct branch/commit
- https://laconic-staging.vdb.to points to port 3100 on the server, therefore:
- in the
package.json, edit this field"scripts":{ "dev": "next -p 3100", - run
export NEXT_PUBLIC_DATOCMS_BYPASS_TYPE="local_json" - use
tmuxthenyarn dev; after a dozen or so seconds, the staging site should be live - use
ctrl + b, dto exittmuxandtmux ato re-enter it
Production
Uses stack orchestrator. For example:
laconic-so --stack laconic-dot-com setup-repositories
laconic-so --stack laconic-dot-com build-containers
laconic-so --stack laconic-dot-com deploy init --output laconic-website-spec.yml --map-ports-to-host localhost-same
laconic-so --stack laconic-dot-com deploy create --spec-file laconic-website-spec.yml --deployment-dir lx-website
# stop here; remove old deployment
laconic-so deployment --dir lx-website start
For each user, future deployments can omit the setup-repositories command. Instead, you can cd ~/cerc/laconic.com and pull in the correct commit.
To update the site, right now today, use the above 5 commands, stopping after the 4th to remove the current deployment. It looks like:
docker ps
068675f32292 cerc/laconic-dot-com:local "docker-entrypoint.s…" 7 weeks ago Up 5 weeks 127.0.0.1:3000->3000/tcp laconic-ac6c84bb25793c5f943a87eb10b4d918-laconic-dot-com-1
To remove it, run docker rm -f <the_above_container_id>
Then, run laconic-so deployment --dir lx-website start and https://laconic.com should be live with your changes.