Docker compose

pull/3/head
TZGyn 2 years ago
parent ae8b26e87d
commit cd836f2755
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -0,0 +1,15 @@
---
version: '1.0'
services:
shortener_frontend:
container_name: shortener_frontend
build:
context: ./react-frontend
dockerfile: Dockerfile
ports: [3003:4173]
shortener_backend:
container_name: shortener_backend
build:
context: ./elysia
dockerfile: Dockerfile
ports: [3004:3000]

@ -0,0 +1,10 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode

@ -0,0 +1,3 @@
host=0.0.0.0
user=postgres
password=password

@ -0,0 +1,13 @@
FROM docker.io/oven/bun
RUN mkdir /shortener-backend
WORKDIR /shortener-backend
COPY ./package.json ./
COPY ./bun.lockb ./
RUN bun install
COPY . .
ENTRYPOINT [ "bun", "run", "./src/index.ts" ]

@ -5,9 +5,9 @@ import { Kysely, PostgresDialect } from 'kysely'
const dialect = new PostgresDialect({
pool: new Pool({
database: 'link-shortener',
host: '0.0.0.0',
user: 'postgres',
password: 'password',
host: Bun.env.host ?? '0.0.0.0',
user: Bun.env.user ?? 'postgres',
password: Bun.env.password ?? 'password',
port: 5432,
max: 10,
}),

@ -0,0 +1,10 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode

@ -0,0 +1,15 @@
FROM docker.io/oven/bun
RUN mkdir /shortener-frontend
WORKDIR /shortener-frontend
COPY ./package.json ./
COPY ./bun.lockb ./
RUN bun install
COPY . .
RUN bun run build
ENTRYPOINT [ "bun", "run", "preview", "--host" ]
Loading…
Cancel
Save