Browse Source

working backend

tags/v1.0.0
Robin Thoni 6 years ago
parent
commit
9b28ed625c
6 changed files with 20 additions and 6 deletions
  1. 14
    2
      backend/Dockerfile
  2. 2
    2
      backend/apache2.conf
  3. 1
    0
      backend/env
  4. 1
    1
      backend/vars-files
  5. 1
    0
      docker-compose.yml
  6. 1
    1
      env

+ 14
- 2
backend/Dockerfile View File

6
 ARG CONFIG_DIR=/etc/default/config-files/
6
 ARG CONFIG_DIR=/etc/default/config-files/
7
 
7
 
8
 RUN apt-get update && apt-get -y install\
8
 RUN apt-get update && apt-get -y install\
9
+        curl\
10
+        git\
11
+        unzip\
9
         apache2=2.4.*\
12
         apache2=2.4.*\
10
         libapache2-mod-php5\
13
         libapache2-mod-php5\
11
         php5\
14
         php5\
12
         php5-mcrypt\
15
         php5-mcrypt\
16
+        php5-imagick\
13
         php5-gd &&\
17
         php5-gd &&\
14
         apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
18
         apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
15
 
19
 
20
+RUN curl https://getcomposer.org/composer.phar -o /usr/local/bin/composer \
21
+        && chmod +x /usr/local/bin/composer
22
+
16
 RUN /usr/sbin/a2enmod rewrite &&\
23
 RUN /usr/sbin/a2enmod rewrite &&\
17
     rm -rf /var/www/html &&\
24
     rm -rf /var/www/html &&\
18
     mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\
25
     mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\
28
 
35
 
29
 COPY ./backend/ /var/www/html/
36
 COPY ./backend/ /var/www/html/
30
 
37
 
38
+RUN cd /var/www/html && composer install
39
+
40
+COPY env "${CONFIG_DIR}"
41
+
42
+RUN chmod -R 777 /var/www/html/storage/
43
+        #&& ln -s /dev/stdout /var/www/html/storage/logs/lumen.log
44
+
31
 COPY ./vars-vars /etc/vars-vars
45
 COPY ./vars-vars /etc/vars-vars
32
 
46
 
33
 COPY ./vars-files /etc/vars-files
47
 COPY ./vars-files /etc/vars-files
36
 
50
 
37
 COPY ./run.sh /run.sh
51
 COPY ./run.sh /run.sh
38
 
52
 
39
-RUN mkdir "${CONFIG_DIR}"
40
-
41
 EXPOSE 80
53
 EXPOSE 80
42
 
54
 
43
 CMD ["/run.sh"]
55
 CMD ["/run.sh"]

+ 2
- 2
backend/apache2.conf View File

25
     Listen 443
25
     Listen 443
26
 </IfModule>
26
 </IfModule>
27
 
27
 
28
-DocumentRoot "/var/www/html/"
28
+DocumentRoot "/var/www/html/public/"
29
 
29
 
30
 <Directory />
30
 <Directory />
31
     Options FollowSymLinks
31
     Options FollowSymLinks
33
     Require all denied
33
     Require all denied
34
 </Directory>
34
 </Directory>
35
 
35
 
36
-<Directory /var/www/html/>
36
+<Directory /var/www/html/public/>
37
     Options FollowSymLinks
37
     Options FollowSymLinks
38
     AllowOverride All
38
     AllowOverride All
39
     Require all granted
39
     Require all granted

+ 1
- 0
backend/env View File

1
+TOKEN=CM_BACKEND_TOKEN

+ 1
- 1
backend/vars-files View File

1
-/var/www/html/env
1
+env /var/www/html/.env

+ 1
- 0
docker-compose.yml View File

19
     backend:
19
     backend:
20
         build: ./backend
20
         build: ./backend
21
         container_name: backend-camotion
21
         container_name: backend-camotion
22
+#        restart: unless-stopped
22
         networks:
23
         networks:
23
             camotion.internal.docker:
24
             camotion.internal.docker:
24
                 aliases:
25
                 aliases:

+ 1
- 1
env View File

1
-CM_BACKEND_TOKEN=change_it
1
+CM_BACKEND_TOKEN=ed249efcda48a07071e2a341fef8759f1bfafeae

Loading…
Cancel
Save