Commit 51a3eb62 authored by Yannis Barlas's avatar Yannis Barlas

chore(*): backup

parent 7ce63952
FROM node:8.16.0-alpine
FROM node:8.16
WORKDIR /usr/src/app
# RUN apk add yarn git python build-base
# RUN apt-get update && apt-get install
RUN apt-get update \
&& apt-get install -y curl build-essential apt-transport-https ca-certificates \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install --no-install-recommends yarn
RUN apk add yarn git python build-base
WORKDIR /usr/src/app
COPY package.json ./
COPY yarn.lock ./
RUN yarn
COPY . .
# COPY . .
EXPOSE 3000
CMD ["yarn", "server"]
# CMD ["yarn", "server"]
......@@ -11,6 +11,7 @@ services:
volumes:
- .:/usr/src/app
- node_modules:/usr/src/app/node_modules
command: node ./scripts/startCompose.js
db:
image: postgres:10-alpine
ports:
......
#!/usr/bin/env node
const config = require('config')
const { dbExists, setupDb } = require('@pubsweet/db-manager')
const setup = async () => {
console.log('YES')
const exists = await dbExists()
console.log('agains')
if (!exists) {
// if (_.has(config, 'dbManager') {
// //if (config.has('dbManager')) {
// await setupDb(config.get('dbManager'))
// } else {
// throw new Error(
// 'Setup database with "pubsweet setupdb" before starting app',
// )
// }
console.log('nope')
await setupDb(config.get('dbManager'))
}
}
setup()
......@@ -3088,12 +3088,6 @@ config-chain@^1.1.12:
ini "^1.3.4"
proto-list "~1.2.1"
config@^1.30.0:
version "1.31.0"
resolved "https://registry.yarnpkg.com/config/-/config-1.31.0.tgz#ab08aeba6536015d220cd0afe14b3e0501082542"
dependencies:
json5 "^1.0.1"
config@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/config/-/config-2.0.1.tgz#995ccc8175460578d646ac0a2e4018ffa44ca046"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment