-
Notifications
You must be signed in to change notification settings - Fork 383
Docker: Build and Install
Eduard Marbach edited this page Oct 6, 2018
·
6 revisions
Following steps are required to build the docker image:
- Build the necessary zip-file for docker. Will be done via grunt tasks. (Commands
grunt build:docker
) - Build the docker image with the provided Dockerfile. (Commands
docker build -t restyaplatform/restyaboard .
)
The steps are concatenated via a npm script (check package.json). The grunt-cli
have to be installed in first place.
Then you can run npm run docker:fullbuild
To publish the image you have to use the CLI of docker. Check HERE
The restyaboard platform will be available through docker hub and the specified name.
To easily startup the application you can use following compose:
version: '2'
volumes:
restyaboard_db:
driver: local
restyaboard_media:
driver: local
services:
restyaboard:
image: restyaplatform/restyaboard:dev
environment:
POSTGRES_DB: restyaboard
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: admin
POSTGRES_USER: admin
SMTP_DOMAIN: domain
SMTP_USERNAME: user
SMTP_PASSWORD: pass
SMTP_SERVER: server
SMTP_PORT: 465
TZ: Etc/UTC
volumes:
- restyaboard_media:/usr/share/nginx/html/media
ports:
- "8081:80"
postgres:
image: postgres:9-alpine
environment:
POSTGRES_DB: restyaboard
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: admin
POSTGRES_USER: admin
volumes:
- restyaboard_db:/var/lib/postgresql/data
Then just run docker-compose up -d
and everything will startup (docker-compose down
for removing everyhing).
If you run via run
command you have to start the postgres db in advance make it accessible. (docker-compose easier because it starts network adapters for the stack).
docker run --rm -d -e POSTGRES_DB='restyaboard' \
-e POSTGRES_HOST='postgres' \
-e POSTGRES_PASSWORD='admin' \
-e POSTGRES_USER='admin' \
-p 8081:80 \
--name restyaboard restyaplatform/restyaboard:dev