Teddy Xinyuan Chen
		
	commited on
		
		
					2024-02-21T12-25-58Z
Browse files- Dockerfile +4 -1
 - start.sh +5 -0
 
    	
        Dockerfile
    CHANGED
    
    | 
         @@ -7,11 +7,14 @@ COPY ./requirements.txt /code/requirements.txt 
     | 
|
| 7 | 
         
             
            RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
         
     | 
| 8 | 
         | 
| 9 | 
         
             
            # ADD https://static.simonwillison.net/static/2023/history.db /code/history.db
         
     | 
| 
         | 
|
| 10 | 
         
             
            COPY ./data /code/data
         
     | 
| 11 | 
         | 
| 12 | 
         
             
            # RUN sqlite-utils tables /code/history.db --counts
         
     | 
| 13 | 
         
             
            RUN chmod 755 -R /code/data
         
     | 
| 
         | 
|
| 14 | 
         | 
| 15 | 
         
             
            COPY ./metadata.yml /code/metadata.yml
         
     | 
| 16 | 
         | 
| 17 | 
         
            -
            CMD ["datasette", "/code/data/*.db", "-m", "/code/metadata.yml", "--host", "0.0.0.0", "--port", "7860"]
         
     | 
| 
         | 
| 
         | 
|
| 7 | 
         
             
            RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
         
     | 
| 8 | 
         | 
| 9 | 
         
             
            # ADD https://static.simonwillison.net/static/2023/history.db /code/history.db
         
     | 
| 10 | 
         
            +
            COPY ./start.sh /code/start.sh
         
     | 
| 11 | 
         
             
            COPY ./data /code/data
         
     | 
| 12 | 
         | 
| 13 | 
         
             
            # RUN sqlite-utils tables /code/history.db --counts
         
     | 
| 14 | 
         
             
            RUN chmod 755 -R /code/data
         
     | 
| 15 | 
         
            +
            RUN chmod 755 /code/start.sh
         
     | 
| 16 | 
         | 
| 17 | 
         
             
            COPY ./metadata.yml /code/metadata.yml
         
     | 
| 18 | 
         | 
| 19 | 
         
            +
            # CMD ["datasette", "/code/data/*.db", "-m", "/code/metadata.yml", "--host", "0.0.0.0", "--port", "7860"]
         
     | 
| 20 | 
         
            +
            CMD ["bash", "start.sh"]
         
     | 
    	
        start.sh
    ADDED
    
    | 
         @@ -0,0 +1,5 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            #!/usr/bin/env bash
         
     | 
| 2 | 
         
            +
             
     | 
| 3 | 
         
            +
            # CMD ["datasette", "/code/data/*.db", "-m", "/code/metadata.yml", "--host", "0.0.0.0", "--port", "7860"]
         
     | 
| 4 | 
         
            +
             
     | 
| 5 | 
         
            +
            datasette /code/data/*.db -m /code/metadata.yml --host "0.0.0.0" --port 7860
         
     |