Docker compose file
This commit is contained in:
33
docker-compose.yml
Normal file
33
docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
x-service-base: &service-base
|
||||||
|
user: ${UID:?UID missing}:${GID:?GID missing}
|
||||||
|
tty: true
|
||||||
|
env_file: .env
|
||||||
|
|
||||||
|
x-service-bun: &service-bun
|
||||||
|
<<: *service-base
|
||||||
|
image: oven/bun
|
||||||
|
working_dir: /app/
|
||||||
|
|
||||||
|
x-volume-app: &volume-app ./:/app/
|
||||||
|
|
||||||
|
|
||||||
|
services:
|
||||||
|
server:
|
||||||
|
<<: *service-bun
|
||||||
|
container_name: server
|
||||||
|
volumes:
|
||||||
|
- *volume-app
|
||||||
|
working_dir: /app/packages/server
|
||||||
|
environment:
|
||||||
|
NODE_ENV: development
|
||||||
|
entrypoint: ["bun", "src/index.ts"]
|
||||||
|
|
||||||
|
webui:
|
||||||
|
<<: *service-bun
|
||||||
|
container_name: webui
|
||||||
|
volumes:
|
||||||
|
- *volume-app
|
||||||
|
working_dir: /app/packages/webui
|
||||||
|
environment:
|
||||||
|
NODE_ENV: development
|
||||||
|
entrypoint: ["bun", "dev"]
|
||||||
@@ -5,11 +5,11 @@ import { Config } from "effect"
|
|||||||
export module ServerConfig {
|
export module ServerConfig {
|
||||||
export const mode = Config.string("NODE_ENV").pipe(
|
export const mode = Config.string("NODE_ENV").pipe(
|
||||||
Config.validate({
|
Config.validate({
|
||||||
message: "Expected 'development' or 'production'",
|
|
||||||
validation: S.is(S.Union(
|
validation: S.is(S.Union(
|
||||||
S.Literal("development"),
|
S.Literal("development"),
|
||||||
S.Literal("production"),
|
S.Literal("production"),
|
||||||
)),
|
)),
|
||||||
|
message: "Expected 'development' or 'production'",
|
||||||
}),
|
}),
|
||||||
Config.withDefault("development"),
|
Config.withDefault("development"),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user