use yaml not yml
This commit is contained in:
parent
ce800b9ddb
commit
a58a46d4aa
@ -1,24 +1,11 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
|
||||||
# caddy:
|
|
||||||
# image: caddy:alpine
|
|
||||||
# ports:
|
|
||||||
# - "8081:80"
|
|
||||||
# volumes:
|
|
||||||
# - ./public:/srv
|
|
||||||
# - ./Caddyfile:/etc/caddy/Caddyfile
|
|
||||||
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: our-postgres
|
container_name: our-postgres
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
env_file: ./../../.env
|
||||||
POSTGRES_USER: ${DB_USER}
|
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
||||||
POSTGRES_DB: ${DB_NAME}
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
@ -36,8 +23,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
env_file: ./../../.env
|
||||||
PGWEB_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}?sslmode=disable
|
|
||||||
ports:
|
ports:
|
||||||
- "8091:8081"
|
- "8091:8081"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -57,6 +43,21 @@ services:
|
|||||||
# ports:
|
# ports:
|
||||||
# - "5050:5050"
|
# - "5050:5050"
|
||||||
|
|
||||||
|
our:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: our-app
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
env_file: ./../../.env ## @see ./src/config/env.ts for all env var names.
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
entrypoint: >
|
||||||
|
sh -c "npm run deploy && npm run start:server"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
@ -11,16 +11,13 @@ services:
|
|||||||
- ./public:/srv
|
- ./public:/srv
|
||||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||||
networks:
|
networks:
|
||||||
- our
|
- default
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: our-postgres
|
container_name: our-postgres
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
env_file: ./.env
|
||||||
POSTGRES_USER: ${DB_USER}
|
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
||||||
POSTGRES_DB: ${DB_NAME}
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
@ -32,35 +29,39 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
networks:
|
networks:
|
||||||
- our
|
- default
|
||||||
|
|
||||||
pgadmin:
|
server:
|
||||||
image: dpage/pgadmin4:latest
|
|
||||||
environment:
|
|
||||||
PGADMIN_LISTEN_PORT: 5050
|
|
||||||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
|
|
||||||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
|
|
||||||
PGADMIN_DISABLE_POSTFIX: true
|
|
||||||
ports:
|
|
||||||
- "5050:5050"
|
|
||||||
networks:
|
|
||||||
- our
|
|
||||||
|
|
||||||
|
|
||||||
our:
|
|
||||||
image: gitea.futureporn.net/futureporn/our:latest
|
image: gitea.futureporn.net/futureporn/our:latest
|
||||||
container_name: our-app
|
container_name: our-server
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
env_file: .env.production ## @see ./src/config/env.ts for all env var names.
|
env_file: ./.env
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- our
|
- default
|
||||||
|
init: true
|
||||||
|
entrypoint: >
|
||||||
|
sh -c "npm run deploy && npm run start:server"
|
||||||
|
|
||||||
|
worker:
|
||||||
|
image: gitea.futureporn.net/futureporn/our:latest
|
||||||
|
container_name: our-worker
|
||||||
|
env_file: ./.env
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
init: true
|
||||||
|
entrypoint: >
|
||||||
|
sh -c "npm run start:worker"
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
our:
|
default: {}
|
@ -13,14 +13,12 @@
|
|||||||
"start:server": "tsx ./src/index.ts",
|
"start:server": "tsx ./src/index.ts",
|
||||||
"start:worker": "tsx ./src/worker.ts",
|
"start:worker": "tsx ./src/worker.ts",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"prepare": "svelte-kit sync || echo ''",
|
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
||||||
"dev:worker": "GRAPHILE_LOGGER_DEBUG=1 tsx watch ./src/worker.ts",
|
"dev:worker": "GRAPHILE_LOGGER_DEBUG=1 tsx watch ./src/worker.ts",
|
||||||
"dev:build": "chokidar 'src/**/*.{js,ts}' -c tsup --clean",
|
"dev:build": "chokidar 'src/**/*.{js,ts}' -c tsup --clean",
|
||||||
"build": "tsup --clean",
|
"build": "tsup --clean",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"clean": "rm -rf node_modules && rm -rf pnpm-lock.yaml"
|
"clean": "rm -rf node_modules && rm -rf pnpm-lock.yaml",
|
||||||
|
"deploy": "npx prisma migrate deploy"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^1.3.1",
|
"@eslint/compat": "^1.3.1",
|
||||||
@ -113,4 +111,4 @@
|
|||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "tsx prisma/seed.ts"
|
"seed": "tsx prisma/seed.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,6 +26,7 @@ const EnvSchema = z.object({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const parsed = EnvSchema.safeParse(process.env);
|
const parsed = EnvSchema.safeParse(process.env);
|
||||||
|
console.log(parsed)
|
||||||
|
|
||||||
if (!parsed.success) {
|
if (!parsed.success) {
|
||||||
console.error('❌ Invalid environment variables:', parsed.error.flatten().fieldErrors);
|
console.error('❌ Invalid environment variables:', parsed.error.flatten().fieldErrors);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user