bare bones docker setup
This commit is contained in:
parent
501e9e59e0
commit
922d145570
|
@ -0,0 +1,22 @@
|
||||||
|
// 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:1-20-bullseye",
|
||||||
|
|
||||||
|
// 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": [],
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
}
|
|
@ -25,4 +25,7 @@ PRICE_ID=
|
||||||
NEXT_PUBLIC_TRIAL_PERIOD_DAYS=
|
NEXT_PUBLIC_TRIAL_PERIOD_DAYS=
|
||||||
NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL=
|
NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL=
|
||||||
BASE_URL=http://localhost:3000
|
BASE_URL=http://localhost:3000
|
||||||
NEXT_PUBLIC_PRICING=
|
NEXT_PUBLIC_PRICING=
|
||||||
|
|
||||||
|
# Docker postgres settings
|
||||||
|
POSTGRES_PASSWORD=
|
||||||
|
|
|
@ -42,3 +42,6 @@ next-env.d.ts
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
|
||||||
|
# docker
|
||||||
|
pgdata
|
|
@ -0,0 +1,29 @@
|
||||||
|
# playwright doesnt support debian image
|
||||||
|
FROM ubuntu:focal
|
||||||
|
|
||||||
|
run apt-get update && apt-get install wget xz-utils -y
|
||||||
|
|
||||||
|
RUN mkdir /data
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
|
RUN wget https://nodejs.org/dist/v20.5.0/node-v20.5.0-linux-x64.tar.xz -O nodejs.tar.xz \
|
||||||
|
&& mkdir /opt/nodejs \
|
||||||
|
&& tar -xf nodejs.tar.xz --strip-components 1 -C /opt/nodejs \
|
||||||
|
&& rm nodejs.tar.xz
|
||||||
|
ENV PATH="$PATH:/opt/nodejs/bin"
|
||||||
|
RUN npm install -g yarn
|
||||||
|
|
||||||
|
COPY ./package.json ./yarn.lock ./playwright.config.ts .
|
||||||
|
|
||||||
|
RUN yarn
|
||||||
|
RUN npx playwright install-deps
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
CMD yarn prisma migrate deploy && yarn start
|
||||||
|
|
||||||
|
# RUN apt-get update && apt-get install \
|
||||||
|
# git
|
|
@ -0,0 +1,16 @@
|
||||||
|
version: "3.5"
|
||||||
|
services:
|
||||||
|
linkwarden:
|
||||||
|
env_file: .env
|
||||||
|
restart: always
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
volumes:
|
||||||
|
- /var/lib/elasticsearch/data
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env_file: .env
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./pgdata:/var/lib/postgresql/data
|
Ŝarĝante…
Reference in New Issue