Skip to content

ArtFXDev/silex-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silex deploy

Silex docker-compose and Nginx deployment files.

Introduction

The compose stack uses the following repositories:

Prerequisites

Make sure to create and modify the env files in ./env (use .example files for a template):

  • ./env/cgwire CGWire (Zou, Zou db) related variables
  • ./env/harvest Harvest (UI, API) variables
  • ./env/broker Event broker variables

-> The .env file describe global environment variables for the docker-compose.yml file.

Installation

If it's your first time cloning the repository, you can launch the init.sh script:

$ bash ./scripts/init.sh

It will do the following steps:

To run the compose stack in detached mode:

$ docker-compose --env-file .env up -d

1) Zou PostgreSQL database setup

Run a sh shell in the zou-db container and create the database:

$ docker-compose exec zou-db sh
$ su - postgres -c "createdb -T template0 -E UTF8 --owner postgres zoudb"

Then test that the database was created successfully:

$ psql -U postgres
$ \l # List databases
$ \c zoudb # Switch database
$ \d # List tables

2) Initialize Zou database data and admin account

$ docker-compose exec zou-app sh
$ zou upgrade-db # Apply migrations
$ zou init-data # Initialize entities
$ zou create-admin [email protected] --password mysecretpassword
$ exit

Testing on local computer

To test the whole stack locally, modify your host file and add those urls:

127.0.0.1 docs.prod.silex.artfx.fr
127.0.0.1 front.prod.silex.artfx.fr
127.0.0.1 kitsu.prod.silex.artfx.fr
127.0.0.1 events.prod.silex.artfx.fr

Update

To update and pull the latest images, use the following commands:

$ docker-compose pull
$ docker-compose --env-file .env up -d --build # Rebuild images

Contributing

Pull requests and issues are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT @ArtFX