Skip to content
Snippets Groups Projects
Commit c94e46cc authored by Jure's avatar Jure
Browse files

chore: adapt docker compose for deployment

parent 4601d4a8
No related branches found
No related tags found
No related merge requests found
FROM xpub/xpub:base
FROM node:12
WORKDIR ${HOME}
......
version: '3'
services:
job-xsweet:
image: pubsweet/job-xsweet
restart: always
container_name: job-xsweet
hostname: job-xsweet
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
postgres:
image: postgres:10-alpine
restart: always
container_name: postgres
hostname: postgres
environment:
- POSTGRES_USER
- POSTGRES_DB
- POSTGRES_PASSWORD
- POSTGRES_PORT
volumes:
- ./data/postgres:/var/lib/postgresql
- ./scripts/test.sql:/docker-entrypoint-initdb.d/test.sql
app:
user: 'node'
build:
context: .
dockerfile: ./Dockerfile
command: sh -c "./scripts/wait-for-it.sh postgres:5432 -s -t 40 -- npx pubsweet server"
command: sh -c "yarn pubsweet server"
volumes:
- ./:/home/xpub
- /home/xpub/node_modules
......@@ -15,15 +35,3 @@ services:
environment:
PGHOST: postgres
PGUSER: $USER
postgres:
image: postgres
environment:
POSTGRES_USER: $USER
volumes:
- postgres-volume:/var/lib/postgresql/data
- ./scripts/test.sql:/docker-entrypoint-initdb.d/test.sql
volumes:
postgres-volume:
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