List of commits:
Subject Hash Author Date (UTC)
initialize on first run a7eb6521e87bf6f7fc8ac746db7241300473b549 Ivaylo Iliev 2017-08-27 17:26:30
update build scripts 0ca23c79e7f0c2e0a2beae8ea676d1bc6c6c237f Ivaylo Iliev 2017-08-27 16:23:17
neo bundle, neo entity, empty command 5df95da9f7d462e891685b5556abeae1abdd28b4 Ivaylo Iliev 2017-08-27 16:11:31
add mysql 798d32267444f4f26ce9215817720217970c5e06 Ivaylo Iliev 2017-08-27 14:33:00
run and build script a91daf3d789ac334eca951731504f1a17e79952d Ivaylo Iliev 2017-08-27 10:52:34
remove security checks 613463e0180c3e812194b0bac40aaef508d99823 Ivaylo Iliev 2017-08-27 10:52:12
add nasa api key a4f8c147880e69994a988a176298ed54dacc53db Ivaylo Iliev 2017-08-27 08:45:17
hello world json 636f0cca5234693152d25e8a6f7f2e812b39fa16 Ivaylo Iliev 2017-08-27 08:29:56
empty symfony app 9c121393c6caf39150b1eeaa274c978edef1425e Ivaylo Iliev 2017-08-26 23:05:32
update default nginx config 87638100759fe5cec69d45fbbcf7bbda3464131a Ivaylo Iliev 2017-08-26 23:03:30
Initial commit f0ac3b6d6f330c3ed2e5c760a30abf15601d0494 Ivaylo Iliev 2017-08-26 22:23:30
Commit a7eb6521e87bf6f7fc8ac746db7241300473b549 - initialize on first run
Author: Ivaylo Iliev
Author date (UTC): 2017-08-27 17:26
Committer name: Ivaylo Iliev
Committer date (UTC): 2017-08-27 17:26
Parent(s): 0ca23c79e7f0c2e0a2beae8ea676d1bc6c6c237f
Signing key:
Tree: 437ad801a87b1eee1484f261edc703daf3245412
File Lines added Lines deleted
README.md 24 0
docker/application/Dockerfile 3 15
docker/application/nasa.start 12 0
run 7 4
File README.md changed (mode: 100644) (index 97b1830..3f3eb56)
... ... build images from the docker folder and map the source of the application to the
22 22 ### On Windows ### On Windows
23 23
24 24 - follow the port forwarding after image is run - follow the port forwarding after image is run
25
26 ## Run images manually
27
28 ### On GNU/Linux and Mac
29
30 If you do not follow build till the end you can ./run and follow the steps
31
32 ### On Windows
33
34 Run manually mysql image and app/server image you build in the previous step
35
36 ## Starting containers
37
38 - docker ps -a
39 - start mysql-server
40 - start dev-server
41
42 ## Installing db
43
44 It shall be automatic on dev-server start - it takes time for the first run, so be patient
45
46 If it does not run automatically by some reason in dev-server in /nasa there shall be a ./nasa-start
47 If errors occured they shall be in /nasa/nasa.initialization.log
48 While waiting you can tail -f /nasa/nasa.initialization.log
File docker/application/Dockerfile changed (mode: 100644) (index 45a0dff..547c4df)
... ... RUN \
36 36 curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony && \ curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony && \
37 37 chmod a+x /usr/local/bin/symfony chmod a+x /usr/local/bin/symfony
38 38
39 # Update composer
40 RUN \
41 cd /var/www/html/nasa && \
42 composer update
43
44 # Create DB and run all migrations
45 RUN \
46 cd /var/www/html/nasa && \
47 bin/console doctrine:database:create && \
48 bin/console doctrine:migrations:migrate -n
49
50 39 # Define mountable directories. # Define mountable directories.
51 40 VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx"] VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx"]
52 41
53 42 RUN \ RUN \
54 43 rm /var/www/html/* rm /var/www/html/*
55 44
45 COPY nasa.start /nasa/nasa.start
46
56 47 # Define working directory. # Define working directory.
57 48 WORKDIR /var/www/html WORKDIR /var/www/html
58 49
59 50 # Define default command. # Define default command.
60 CMD \
61 /etc/init.d/nginx start & \
62 /etc/init.d/php7.1-fpm start & \
63 tail -f /var/log/dmesg
51 CMD /nasa/nasa.start
64 52
65 53 # Expose ports. # Expose ports.
66 54 EXPOSE 80 EXPOSE 80
File docker/application/nasa.start added (mode: 100755) (index 0000000..177a23d)
1 #!/bin/bash
2
3 if [ ! -f /nasa/nasa.initialized ]; then
4 cd /var/www/html/nasa
5 composer update &>> /nasa/nasa.initialization.log
6 bin/console doctrine:database:create &>> /nasa/nasa.initialization.log
7 bin/console doctrine:migrations:migrate -n &>> /nasa/nasa.initialization.log
8
9 touch /nasa/nasa.initialized
10 fi
11
12 /etc/init.d/nginx start & /etc/init.d/php7.1-fpm start & tail -f /var/log/dmesg
File run changed (mode: 100755) (index ec51dcf..f453bc5)
... ... echo # (optional) move to a new line
5 5 if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
6 6 echo # (optional) move to a new line echo # (optional) move to a new line
7 7 docker network create --driver bridge isolated docker network create --driver bridge isolated
8 printf "\n\nisolated network created\n\n"
8 9 else else
9 printf "not creating isolated network\n"
10 printf "not creating isolated network\n\n"
10 11 fi fi
11 12
12 13 read -p "Do you want to run mongodb-server y/N? " -n 1 -r read -p "Do you want to run mongodb-server y/N? " -n 1 -r
 
... ... echo # (optional) move to a new line
14 15 if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
15 16 echo # (optional) move to a new line echo # (optional) move to a new line
16 17 docker run --name mongodb-server -p 27017:27017 --network isolated -d mongo docker run --name mongodb-server -p 27017:27017 --network isolated -d mongo
18 printf "\n\nmongodb-server runned\n\n"
17 19 else else
18 printf "not running mongodb\n"
20 printf "not running mongodb\n\n"
19 21 fi fi
20 22
21 23 read -p "Do you want to run mysql-server y/N? " -n 1 -r read -p "Do you want to run mysql-server y/N? " -n 1 -r
 
... ... echo # (optional) move to a new line
23 25 if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
24 26 echo # (optional) move to a new line echo # (optional) move to a new line
25 27 docker run --name mysql-server -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --network isolated -d mysql docker run --name mysql-server -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --network isolated -d mysql
28 printf "\n\nmysql-server runned\n\n"
26 29 else else
27 printf "not running mysql\n"
30 printf "not running mysql\n\n"
28 31 fi fi
29 32
30 33 if [ -n "$1" ]; then if [ -n "$1" ]; then
 
... ... if [[ $REPLY =~ ^[Yy]$ ]]; then
50 53 docker run --name dev-server -p 8080:80 -v $(pwd)/src:/var/www/html --network isolated -d app/server:$VERSION docker run --name dev-server -p 8080:80 -v $(pwd)/src:/var/www/html --network isolated -d app/server:$VERSION
51 54 docker exec -it dev-server bash docker exec -it dev-server bash
52 55 else else
53 printf "not running app/server:$VERSION\n"
56 printf "not running app/server:$VERSION\n\n"
54 57 fi fi
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ranapat/nasa

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ranapat/nasa

Clone this repository using git:
git clone git://git.rocketgit.com/user/ranapat/nasa

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main